Skip to content

Commit 8479758

Browse files
[Storage] Address comments from API Review for March release (Azure#23294)
1 parent fdaba3a commit 8479758

File tree

7 files changed

+17
-15
lines changed

7 files changed

+17
-15
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -923,7 +923,7 @@ class ContainerSasPermissions(object):
923923
Write a new blob, snapshot a blob, or copy a blob to a new blob.
924924
:keyword bool permanent_delete:
925925
To enable permanent delete on the blob is permitted.
926-
:keyword bool find:
926+
:keyword bool filter_by_tags:
927927
To enable finding blobs by tags.
928928
:keyword bool move:
929929
Move a blob or a directory and its contents to a new location.
@@ -945,7 +945,7 @@ def __init__(self, read=False, write=False, delete=False,
945945
self.permanent_delete = kwargs.pop('permanent_delete', False)
946946
self.list = list
947947
self.tag = tag
948-
self.find = kwargs.pop('find', False)
948+
self.filter_by_tags = kwargs.pop('filter_by_tags', False)
949949
self.move = kwargs.pop('move', False)
950950
self.execute = kwargs.pop('execute', False)
951951
self.set_immutability_policy = kwargs.pop('set_immutability_policy', False)
@@ -958,7 +958,7 @@ def __init__(self, read=False, write=False, delete=False,
958958
('y' if self.permanent_delete else '') +
959959
('l' if self.list else '') +
960960
('t' if self.tag else '') +
961-
('f' if self.find else '') +
961+
('f' if self.filter_by_tags else '') +
962962
('m' if self.move else '') +
963963
('e' if self.execute else '') +
964964
('i' if self.set_immutability_policy else ''))
@@ -988,14 +988,14 @@ def from_string(cls, permission):
988988
p_permanent_delete = 'y' in permission
989989
p_list = 'l' in permission
990990
p_tag = 't' in permission
991-
p_find = 'f' in permission
991+
p_filter_by_tags = 'f' in permission
992992
p_move = 'm' in permission
993993
p_execute = 'e' in permission
994994
p_set_immutability_policy = 'i' in permission
995995
parsed = cls(read=p_read, write=p_write, delete=p_delete, list=p_list,
996996
delete_previous_version=p_delete_previous_version, tag=p_tag, add=p_add,
997-
create=p_create, permanent_delete=p_permanent_delete, find=p_find, move=p_move,
998-
execute=p_execute, set_immutability_policy=p_set_immutability_policy)
997+
create=p_create, permanent_delete=p_permanent_delete, filter_by_tags=p_filter_by_tags,
998+
move=p_move, execute=p_execute, set_immutability_policy=p_set_immutability_policy)
999999

10001000
return parsed
10011001

sdk/storage/azure-storage-blob/tests/test_common_blob.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1839,7 +1839,7 @@ def test_blob_service_sas(self, storage_account_name, storage_account_key):
18391839
account_key=container.credential.account_key,
18401840
permission=ContainerSasPermissions(
18411841
read=True, write=True, delete=True, list=True, delete_previous_version=True,
1842-
tag=True, add=True, create=True, permanent_delete=True, find=True, move=True,
1842+
tag=True, add=True, create=True, permanent_delete=True, filter_by_tags=True, move=True,
18431843
execute=True, set_immutability_policy=True
18441844
),
18451845
expiry=datetime.utcnow() + timedelta(hours=1),
@@ -1853,7 +1853,7 @@ def test_blob_service_sas(self, storage_account_name, storage_account_key):
18531853
account_key=blob.credential.account_key,
18541854
permission=BlobSasPermissions(
18551855
read=True, add=True, create=True, write=True, delete=True, delete_previous_version=True,
1856-
permanent_delete=True, tag=True, find=True, move=True, execute=True, set_immutability_policy=True
1856+
permanent_delete=True, tag=True, move=True, execute=True, set_immutability_policy=True
18571857
),
18581858
expiry=datetime.utcnow() + timedelta(hours=1),
18591859
)

sdk/storage/azure-storage-blob/tests/test_container.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1255,7 +1255,7 @@ def test_find_blobs_by_tags_container_sas(self, storage_account_name, storage_ac
12551255
container.account_name,
12561256
container.container_name,
12571257
account_key=storage_account_key,
1258-
permission=ContainerSasPermissions(find=True),
1258+
permission=ContainerSasPermissions(filter_by_tags=True),
12591259
expiry=datetime.utcnow() + timedelta(hours=1)
12601260
)
12611261
container = ContainerClient.from_container_url(container.url, credential=sas_token)

sdk/storage/azure-storage-file-share/azure/storage/fileshare/_directory_client.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ def rename_directory(
367367
:keyword file_last_write_time:
368368
Last write time for the file.
369369
:paramtype file_last_write_time:~datetime.datetime or str
370-
:keyword dict(str,str) metadata:
370+
:keyword Dict[str,str] metadata:
371371
A name-value pair to associate with a file storage object.
372372
:keyword lease:
373373
Required if the destination file has an active lease. Value can be a ShareLeaseClient object
@@ -632,7 +632,8 @@ def exists(self, **kwargs):
632632
633633
:kwarg int timeout:
634634
The timeout parameter is expressed in seconds.
635-
:returns: boolean
635+
:returns: True if the directory exists, False otherwise.
636+
:rtype: bool
636637
"""
637638
try:
638639
self._client.directory.get_properties(**kwargs)

sdk/storage/azure-storage-file-share/azure/storage/fileshare/_file_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -834,7 +834,7 @@ def rename_file(
834834
:keyword file_last_write_time:
835835
Last write time for the file.
836836
:paramtype file_last_write_time:~datetime.datetime or str
837-
:keyword dict(str,str) metadata:
837+
:keyword Dict[str,str] metadata:
838838
A name-value pair to associate with a file storage object.
839839
:keyword source_lease:
840840
Required if the source file has an active lease. Value can be a ShareLeaseClient object

sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_directory_client_async.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ async def rename_directory(
247247
:keyword file_last_write_time:
248248
Last write time for the file.
249249
:paramtype file_last_write_time:~datetime.datetime or str
250-
:keyword dict(str,str) metadata:
250+
:keyword Dict[str,str] metadata:
251251
A name-value pair to associate with a file storage object.
252252
:keyword lease:
253253
Required if the destination file has an active lease. Value can be a ShareLeaseClient object
@@ -377,7 +377,8 @@ async def exists(self, **kwargs):
377377
378378
:kwarg int timeout:
379379
The timeout parameter is expressed in seconds.
380-
:returns: boolean
380+
:returns: True if the directory exists, False otherwise.
381+
:rtype: bool
381382
"""
382383
try:
383384
await self._client.directory.get_properties(**kwargs)

sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_file_client_async.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ async def rename_file(
710710
:keyword file_last_write_time:
711711
Last write time for the file.
712712
:paramtype file_last_write_time:~datetime.datetime or str
713-
:keyword dict(str,str) metadata:
713+
:keyword Dict[str,str] metadata:
714714
A name-value pair to associate with a file storage object.
715715
:keyword source_lease:
716716
Required if the source file has an active lease. Value can be a ShareLeaseClient object

0 commit comments

Comments
 (0)