coopergillan commented on a change in pull request #10164:
URL: https://github.com/apache/airflow/pull/10164#discussion_r654863578
##########
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:
Interesting. Could you share the output you are seeing from pycharm? I
cannot figure out where the `boto3.s3.Object` is defined. I have been through
the `boto3`, `botocore` and `airflow` code as well as [some docs]() but I have
not been able to.
I think we need the
[`boto3-type-annotations`](https://pypi.org/project/boto3-type-annotations/) to
solve this issue. [Check out this Stack Overflow question
also](https://stackoverflow.com/questions/52087307/adding-type-hinting-to-functions-that-return-boto3-objects).
This is something `@mik-laj` once brought up in
https://github.com/apache/airflow/issues/11297 it looks like. I don't have time
to tackle it right now, but I could in the near future.
--
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]