Skip to content

Commit 8bc0fd6

Browse files
Updated walk_blobs rtype to reflect both BlobProperties and BlobPrefix (Azure#40931)
1 parent 206fa48 commit 8bc0fd6

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -883,7 +883,7 @@ def walk_blobs(
883883
include: Optional[Union[List[str], str]] = None,
884884
delimiter: str = "/",
885885
**kwargs: Any
886-
) -> ItemPaged[BlobProperties]:
886+
) -> ItemPaged[Union[BlobProperties, BlobPrefix]]:
887887
"""Returns a generator to list the blobs under the specified container.
888888
The generator will lazily follow the continuation tokens returned by
889889
the service. This operation will list blobs in accordance with a hierarchy,
@@ -908,8 +908,8 @@ def walk_blobs(
908908
This value is not tracked or validated on the client. To configure client-side network timesouts
909909
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
910910
#other-client--per-operation-configuration>`__.
911-
:returns: An iterable (auto-paging) response of BlobProperties.
912-
:rtype: ~azure.core.paging.ItemPaged[~azure.storage.blob.BlobProperties]
911+
:returns: An iterable (auto-paging) response of BlobProperties or BlobPrefix.
912+
:rtype: ~azure.core.paging.ItemPaged[~azure.storage.blob.BlobProperties or ~azure.storage.blob.BlobPrefix]
913913
"""
914914
if kwargs.pop('prefix', None):
915915
raise ValueError("Passing 'prefix' has no effect on filtering, " +

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

+3-2
Original file line numberDiff line numberDiff line change
@@ -873,7 +873,7 @@ def walk_blobs(
873873
include: Optional[Union[List[str], str]] = None,
874874
delimiter: str = "/",
875875
**kwargs: Any
876-
) -> AsyncItemPaged[BlobProperties]:
876+
) -> AsyncItemPaged[Union[BlobProperties, BlobPrefix]]:
877877
"""Returns a generator to list the blobs under the specified container.
878878
The generator will lazily follow the continuation tokens returned by
879879
the service. This operation will list blobs in accordance with a hierarchy,
@@ -899,7 +899,8 @@ def walk_blobs(
899899
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
900900
#other-client--per-operation-configuration>`__.
901901
:returns: An iterable (auto-paging) response of BlobProperties.
902-
:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.storage.blob.BlobProperties]
902+
:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.storage.blob.BlobProperties or
903+
~azure.storage.blob.aio.BlobPrefix]
903904
"""
904905
if kwargs.pop('prefix', None):
905906
raise ValueError("Passing 'prefix' has no effect on filtering, " +

0 commit comments

Comments
 (0)