diff --git a/minio/api.py b/minio/api.py index d9141e732..6f9637876 100644 --- a/minio/api.py +++ b/minio/api.py @@ -21,7 +21,7 @@ Simple Storage Service (aka S3) client to perform bucket and object operations. """ -from __future__ import absolute_import +from __future__ import absolute_import, annotations import itertools import os @@ -1077,9 +1077,17 @@ def fget_object(self, bucket_name, object_name, file_path, response.close() response.release_conn() - def get_object(self, bucket_name, object_name, offset=0, length=0, - request_headers=None, ssec=None, version_id=None, - extra_query_params=None): + def get_object( + self, + bucket_name: str, + object_name: str, + offset: int = 0, + length: int = 0, + request_headers: dict[str, str] | None = None, + ssec: SseCustomerKey | None = None, + version_id: str | None = None, + extra_query_params: dict[str, str] | None = None + ) -> urllib3.BaseHTTPResponse: """ Get data of an object. Returned response should be closed after use to release network resources. To reuse the connection, it's required to