You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/08/05 13:11:45 UTC

[GitHub] [airflow] coopergillan commented on a change in pull request #10164: Add type annotations to S3 hook module

coopergillan commented on a change in pull request #10164:
URL: https://github.com/apache/airflow/pull/10164#discussion_r465715292



##########
File path: airflow/providers/amazon/aws/hooks/s3.py
##########
@@ -198,8 +205,12 @@ def check_for_prefix(self, prefix, delimiter, bucket_name=None):
         return False if plist is None else prefix in plist
 
     @provide_bucket_name
-    def list_prefixes(self, bucket_name=None, prefix='', delimiter='',
-                      page_size=None, max_items=None):
+    def list_prefixes(self,
+                      bucket_name: Optional[str] = None,
+                      prefix: str = '',
+                      delimiter: str = '',
+                      page_size: Optional[int] = None,
+                      max_items: Optional[int] = None) -> Optional[list]:

Review comment:
       I think it makes more sense if the idea behind `Optional[str]` is that it can be a `str` or `None`, yep.




----------------------------------------------------------------
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:
users@infra.apache.org