From e175d03baf965c695dcab42dceebbec69dfeb495 Mon Sep 17 00:00:00 2001 From: Arthur Kim Date: Wed, 2 Aug 2023 17:56:24 +0900 Subject: [PATCH] Add S3Bucket for mypy --- airflow/providers/amazon/aws/hooks/s3.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/airflow/providers/amazon/aws/hooks/s3.py b/airflow/providers/amazon/aws/hooks/s3.py index ae007d38f38b..8878f04e1b58 100644 --- a/airflow/providers/amazon/aws/hooks/s3.py +++ b/airflow/providers/amazon/aws/hooks/s3.py @@ -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) @@ -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.