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.