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 2021/06/28 13:22:29 UTC

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

ccage-simp commented on a change in pull request #10164:
URL: https://github.com/apache/airflow/pull/10164#discussion_r659780809



##########
File path: airflow/providers/amazon/aws/hooks/s3.py
##########
@@ -304,7 +323,7 @@ def check_for_key(self, key, bucket_name=None):
 
     @provide_bucket_name
     @unify_bucket_name_and_key
-    def get_key(self, key, bucket_name=None):
+    def get_key(self, key: str, bucket_name: Optional[str] = None) -> S3Transfer:

Review comment:
       Thanks, Cooper. Saying it's giving pycharm fits might have been hyperbole by me. It's showing an error message due to the confusion over types:
   
   > Unresolved attribute reference 'download_fileobj' for class 'S3Transfer'
   
   When I step into the get_key function it's showing rtype as Object:
   
   >  :rtype: boto3.s3.Object
   




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org