Skip to content

Commit

Permalink
Add S3Bucket for mypy (#33028)
Browse files Browse the repository at this point in the history
  • Loading branch information
kimdwkimdw authored Aug 3, 2023
1 parent 120efc1 commit 44234c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions airflow/providers/amazon/aws/hooks/s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
from airflow.utils.helpers import chunks

if TYPE_CHECKING:
from mypy_boto3_s3.service_resource import Object as S3ResourceObject
from mypy_boto3_s3.service_resource import Bucket as S3Bucket, Object as S3ResourceObject

T = TypeVar("T", bound=Callable)

Expand Down Expand Up @@ -298,7 +298,7 @@ def check_for_bucket(self, bucket_name: str | None = None) -> bool:
return False

@provide_bucket_name
def get_bucket(self, bucket_name: str | None = None) -> object:
def get_bucket(self, bucket_name: str | None = None) -> S3Bucket:
"""
Returns a :py:class:`S3.Bucket` object.
Expand Down

0 comments on commit 44234c2

Please sign in to comment.