Kami commented on a change in pull request #1410: Add type annotations to 
storage API
URL: https://github.com/apache/libcloud/pull/1410#discussion_r366757040
 
 

 ##########
 File path: libcloud/storage/base.py
 ##########
 @@ -383,28 +408,32 @@ def download_object(self, obj, destination_path, 
overwrite_existing=False,
             'download_object not implemented for this driver')
 
     def download_object_as_stream(self, obj, chunk_size=None):
+        # type: (Object, Optional[int]) -> Iterator[bytes]
         """
-        Return a generator which yields object data.
+        Return a iterator which yields object data.
 
         :param obj: Object instance
-        :type obj: :class:`Object`
+        :type obj: :class:`libcloud.storage.base.Object`
 
         :param chunk_size: Optional chunk size (in bytes).
         :type chunk_size: ``int``
+
+        :rtype: ``iterator`` of ``bytes``
         """
         raise NotImplementedError(
             'download_object_as_stream not implemented for this driver')
 
     def upload_object(self, file_path, container, object_name, extra=None,
                       verify_hash=True, headers=None):
+        # type: (str, Container, str, Optional[dict], Optional[bool], 
Optional[dict]) -> Object  # noqa: E501
 
 Review comment:
   And for ``headers`` we could probably use ``Dict[str, str]``.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to