@@ -213,7 +213,8 @@ def get_conn(self) -> BlobServiceClient:
213
213
** extra ,
214
214
)
215
215
216
- def _get_container_client (self , container_name : str ) -> ContainerClient :
216
+ # TODO: rework the interface as it might also return AsyncContainerClient
217
+ def _get_container_client (self , container_name : str ) -> ContainerClient : # type: ignore[override]
217
218
"""
218
219
Instantiate a container client.
219
220
@@ -222,7 +223,7 @@ def _get_container_client(self, container_name: str) -> ContainerClient:
222
223
"""
223
224
return self .blob_service_client .get_container_client (container_name )
224
225
225
- def _get_blob_client (self , container_name : str , blob_name : str ) -> BlobClient :
226
+ def _get_blob_client (self , container_name : str , blob_name : str ) -> BlobClient | AsyncBlobClient :
226
227
"""
227
228
Instantiate a blob client.
228
229
@@ -415,7 +416,8 @@ def upload(
415
416
self .create_container (container_name )
416
417
417
418
blob_client = self ._get_blob_client (container_name , blob_name )
418
- return blob_client .upload_blob (data , blob_type , length = length , ** kwargs )
419
+ # TODO: rework the interface as it might also return Awaitable
420
+ return blob_client .upload_blob (data , blob_type , length = length , ** kwargs ) # type: ignore[return-value]
419
421
420
422
def download (
421
423
self , container_name , blob_name , offset : int | None = None , length : int | None = None , ** kwargs
@@ -430,7 +432,8 @@ def download(
430
432
:param length: Number of bytes to read from the stream.
431
433
"""
432
434
blob_client = self ._get_blob_client (container_name , blob_name )
433
- return blob_client .download_blob (offset = offset , length = length , ** kwargs )
435
+ # TODO: rework the interface as it might also return Awaitable
436
+ return blob_client .download_blob (offset = offset , length = length , ** kwargs ) # type: ignore[return-value]
434
437
435
438
def create_container (self , container_name : str ) -> None :
436
439
"""
@@ -656,7 +659,8 @@ async def check_for_blob_async(self, container_name: str, blob_name: str, **kwar
656
659
return False
657
660
return True
658
661
659
- def _get_container_client (self , container_name : str ) -> AsyncContainerClient :
662
+ # TODO: rework the interface as in parent Hook it returns ContainerClient
663
+ def _get_container_client (self , container_name : str ) -> AsyncContainerClient : # type: ignore[override]
660
664
"""
661
665
Instantiate a container client.
662
666
0 commit comments