Skip to content

Commit 405245a

Browse files
[Storage] Fix progress_hook types for API View (Azure#24170)
1 parent 73f4c8f commit 405245a

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed

sdk/storage/azure-storage-blob/azure/storage/blob/_blob_client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -697,10 +697,11 @@ def upload_blob( # pylint: disable=too-many-locals
697697
698698
:keyword str encoding:
699699
Defaults to UTF-8.
700-
:keyword Callable[[int, Optional[int]], None] progress_hook:
700+
:keyword progress_hook:
701701
A callback to track the progress of a long running upload. The signature is
702702
function(current: int, total: Optional[int]) where current is the number of bytes transfered
703703
so far, and total is the size of the blob or None if the size is unknown.
704+
:paramtype progress_hook: Callable[[int, Optional[int]], None]
704705
:keyword int timeout:
705706
The timeout parameter is expressed in seconds. This method may make
706707
multiple calls to the Azure service and the timeout will apply to

sdk/storage/azure-storage-blob/azure/storage/blob/_container_client.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -959,6 +959,11 @@ def upload_blob(
959959
960960
:keyword str encoding:
961961
Defaults to UTF-8.
962+
:keyword progress_hook:
963+
A callback to track the progress of a long running upload. The signature is
964+
function(current: int, total: Optional[int]) where current is the number of bytes transfered
965+
so far, and total is the size of the blob or None if the size is unknown.
966+
:paramtype progress_hook: Callable[[int, Optional[int]], None]
962967
:returns: A BlobClient to interact with the newly uploaded blob.
963968
:rtype: ~azure.storage.blob.BlobClient
964969

sdk/storage/azure-storage-blob/azure/storage/blob/aio/_blob_client_async.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,10 +366,11 @@ async def upload_blob(
366366
367367
:keyword str encoding:
368368
Defaults to UTF-8.
369-
:keyword Callable[[int, Optional[int]], None] progress_hook:
369+
:keyword progress_hook:
370370
A callback to track the progress of a long running upload. The signature is
371371
function(current: int, total: Optional[int]) where current is the number of bytes transfered
372372
so far, and total is the size of the blob or None if the size is unknown.
373+
:paramtype progress_hook: Callable[[int, Optional[int]], None]
373374
:keyword int timeout:
374375
The timeout parameter is expressed in seconds. This method may make
375376
multiple calls to the Azure service and the timeout will apply to

sdk/storage/azure-storage-blob/azure/storage/blob/aio/_container_client_async.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -819,6 +819,11 @@ async def upload_blob(
819819
820820
:keyword str encoding:
821821
Defaults to UTF-8.
822+
:keyword progress_hook:
823+
A callback to track the progress of a long running upload. The signature is
824+
function(current: int, total: Optional[int]) where current is the number of bytes transfered
825+
so far, and total is the size of the blob or None if the size is unknown.
826+
:paramtype progress_hook: Callable[[int, Optional[int]], None]
822827
:returns: A BlobClient to interact with the newly uploaded blob.
823828
:rtype: ~azure.storage.blob.aio.BlobClient
824829

0 commit comments

Comments
 (0)