Skip to content

Commit 91813fc

Browse files
[Storage] [STG93 GA] APIView Feedback (Azure#35331)
1 parent d46c571 commit 91813fc

File tree

16 files changed

+119
-123
lines changed

16 files changed

+119
-123
lines changed

sdk/storage/azure-storage-blob/azure/storage/blob/_shared/models.py

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -453,19 +453,20 @@ def from_string(cls, permission):
453453
class Services(object):
454454
"""Specifies the services accessible with the account SAS.
455455
456-
:param bool blob:
457-
Access for the `~azure.storage.blob.BlobServiceClient`
458-
:param bool queue:
459-
Access for the `~azure.storage.queue.QueueServiceClient`
460-
:param bool fileshare:
461-
Access for the `~azure.storage.fileshare.ShareServiceClient`
456+
:keyword bool blob:
457+
Access for the `~azure.storage.blob.BlobServiceClient`. Default is False.
458+
:keyword bool queue:
459+
Access for the `~azure.storage.queue.QueueServiceClient`. Default is False.
460+
:keyword bool fileshare:
461+
Access for the `~azure.storage.fileshare.ShareServiceClient`. Default is False.
462462
"""
463463

464-
blob: bool = False
465-
queue: bool = False
466-
fileshare: bool = False
467-
468-
def __init__(self, blob: bool = False, queue: bool = False, fileshare: bool = False):
464+
def __init__(
465+
self, *,
466+
blob: bool = False,
467+
queue: bool = False,
468+
fileshare: bool = False
469+
) -> None:
469470
self.blob = blob
470471
self.queue = queue
471472
self.fileshare = fileshare
@@ -493,7 +494,7 @@ def from_string(cls, string):
493494
res_queue = 'q' in string
494495
res_file = 'f' in string
495496

496-
parsed = cls(res_blob, res_queue, res_file)
497+
parsed = cls(blob=res_blob, queue=res_queue, fileshare=res_file)
497498
parsed._str = string # pylint: disable = protected-access
498499
return parsed
499500

sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_directory_client.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -297,14 +297,12 @@ def get_directory_properties(self, **kwargs):
297297
Use of customer-provided keys must be done over HTTPS.
298298
Required if the directory was created with a customer-provided key.
299299
:keyword bool upn:
300-
Optional. Valid only when Hierarchical Namespace is
301-
enabled for the account. If "True", the user identity values returned
302-
in the x-ms-owner, x-ms-group, and x-ms-acl response headers will be
303-
transformed from Azure Active Directory Object IDs to User Principal
304-
Names. If "False", the values will be returned as Azure Active
305-
Directory Object IDs. The default value is false. Note that group and
306-
application Object IDs are not translated because they do not have
307-
unique friendly names.
300+
If True, the user identity values returned in the x-ms-owner, x-ms-group,
301+
and x-ms-acl response headers will be transformed from Azure Active Directory Object IDs to User
302+
Principal Names in the owner, group, and acl fields of
303+
:class:`~azure.storage.filedatalake.DirectoryProperties`. If False, the values will be returned
304+
as Azure Active Directory Object IDs. The default value is False. Note that group and application
305+
Object IDs are not translate because they do not have unique friendly names.
308306
:keyword int timeout:
309307
Sets the server-side timeout for the operation in seconds. For more details see
310308
https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.

sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_file_client.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -315,22 +315,20 @@ def get_file_properties(self, **kwargs):
315315
Use of customer-provided keys must be done over HTTPS.
316316
Required if the file was created with a customer-provided key.
317317
:keyword bool upn:
318-
Optional. Valid only when Hierarchical Namespace is
319-
enabled for the account. If "True", the user identity values returned
320-
in the x-ms-owner, x-ms-group, and x-ms-acl response headers will be
321-
transformed from Azure Active Directory Object IDs to User Principal
322-
Names. If "False", the values will be returned as Azure Active
323-
Directory Object IDs. The default value is false. Note that group and
324-
application Object IDs are not translated because they do not have
325-
unique friendly names.
318+
If True, the user identity values returned in the x-ms-owner, x-ms-group,
319+
and x-ms-acl response headers will be transformed from Azure Active Directory Object IDs to User
320+
Principal Names in the owner, group, and acl fields of
321+
:class:`~azure.storage.filedatalake.FileProperties`. If False, the values will be returned
322+
as Azure Active Directory Object IDs. The default value is False. Note that group and application
323+
Object IDs are not translate because they do not have unique friendly names.
326324
:keyword int timeout:
327325
Sets the server-side timeout for the operation in seconds. For more details see
328326
https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
329327
This value is not tracked or validated on the client. To configure client-side network timesouts
330328
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-file-datalake
331329
#other-client--per-operation-configuration>`_.
332330
:returns: All user-defined metadata, standard HTTP properties, and system properties for the file.
333-
:rtype: FileProperties
331+
:rtype: ~azure.storage.filedatalake.FileProperties
334332
335333
.. admonition:: Example:
336334

sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_file_system_client.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -569,14 +569,12 @@ def get_paths(
569569
number of items to return per page. If omitted or greater than 5,000, the
570570
response will include up to 5,000 items per page.
571571
:keyword bool upn:
572-
Optional. Valid only when Hierarchical Namespace is
573-
enabled for the account. If "True", the user identity values returned
574-
in the x-ms-owner, x-ms-group, and x-ms-acl response headers will be
575-
transformed from Azure Active Directory Object IDs to User Principal
576-
Names. If "False", the values will be returned as Azure Active
577-
Directory Object IDs. The default value is false. Note that group and
578-
application Object IDs are not translated because they do not have
579-
unique friendly names.
572+
If True, the user identity values returned in the x-ms-owner, x-ms-group,
573+
and x-ms-acl response headers will be transformed from Azure Active Directory Object IDs to User
574+
Principal Names in the owner, group, and acl fields of
575+
:class:`~azure.storage.filedatalake.PathProperties`. If False, the values will be returned
576+
as Azure Active Directory Object IDs. The default value is False. Note that group and application
577+
Object IDs are not translate because they do not have unique friendly names.
580578
:keyword int timeout:
581579
Sets the server-side timeout for the operation in seconds. For more details see
582580
https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.

sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_path_client.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -929,14 +929,12 @@ def _get_path_properties(self, **kwargs):
929929
Use of customer-provided keys must be done over HTTPS.
930930
Required if the file/directory was created with a customer-provided key.
931931
:keyword bool upn:
932-
Optional. Valid only when Hierarchical Namespace is
933-
enabled for the account. If "True", the user identity values returned
934-
in the x-ms-owner, x-ms-group, and x-ms-acl response headers will be
935-
transformed from Azure Active Directory Object IDs to User Principal
936-
Names. If "False", the values will be returned as Azure Active
937-
Directory Object IDs. The default value is false. Note that group and
938-
application Object IDs are not translated because they do not have
939-
unique friendly names.
932+
If True, the user identity values returned in the x-ms-owner, x-ms-group,
933+
and x-ms-acl response headers will be transformed from Azure Active Directory Object IDs to User
934+
Principal Names in the owner, group, and acl fields of the respective property object returned.
935+
If False, the values will be returned as Azure Active Directory Object IDs.
936+
The default value is False. Note that group and application Object IDs are not translate
937+
because they do not have unique friendly names.
940938
:keyword int timeout:
941939
Sets the server-side timeout for the operation in seconds. For more details see
942940
https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.

sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/models.py

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -453,19 +453,20 @@ def from_string(cls, permission):
453453
class Services(object):
454454
"""Specifies the services accessible with the account SAS.
455455
456-
:param bool blob:
457-
Access for the `~azure.storage.blob.BlobServiceClient`
458-
:param bool queue:
459-
Access for the `~azure.storage.queue.QueueServiceClient`
460-
:param bool fileshare:
461-
Access for the `~azure.storage.fileshare.ShareServiceClient`
456+
:keyword bool blob:
457+
Access for the `~azure.storage.blob.BlobServiceClient`. Default is False.
458+
:keyword bool queue:
459+
Access for the `~azure.storage.queue.QueueServiceClient`. Default is False.
460+
:keyword bool fileshare:
461+
Access for the `~azure.storage.fileshare.ShareServiceClient`. Default is False.
462462
"""
463463

464-
blob: bool = False
465-
queue: bool = False
466-
fileshare: bool = False
467-
468-
def __init__(self, blob: bool = False, queue: bool = False, fileshare: bool = False):
464+
def __init__(
465+
self, *,
466+
blob: bool = False,
467+
queue: bool = False,
468+
fileshare: bool = False
469+
) -> None:
469470
self.blob = blob
470471
self.queue = queue
471472
self.fileshare = fileshare
@@ -493,7 +494,7 @@ def from_string(cls, string):
493494
res_queue = 'q' in string
494495
res_file = 'f' in string
495496

496-
parsed = cls(res_blob, res_queue, res_file)
497+
parsed = cls(blob=res_blob, queue=res_queue, fileshare=res_file)
497498
parsed._str = string # pylint: disable = protected-access
498499
return parsed
499500

sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_data_lake_directory_client_async.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -273,14 +273,12 @@ async def get_directory_properties(self, **kwargs):
273273
Use of customer-provided keys must be done over HTTPS.
274274
Required if the directory was created with a customer-provided key.
275275
:keyword bool upn:
276-
Optional. Valid only when Hierarchical Namespace is
277-
enabled for the account. If "True", the user identity values returned
278-
in the x-ms-owner, x-ms-group, and x-ms-acl response headers will be
279-
transformed from Azure Active Directory Object IDs to User Principal
280-
Names. If "False", the values will be returned as Azure Active
281-
Directory Object IDs. The default value is false. Note that group and
282-
application Object IDs are not translated because they do not have
283-
unique friendly names.
276+
If True, the user identity values returned in the x-ms-owner, x-ms-group,
277+
and x-ms-acl response headers will be transformed from Azure Active Directory Object IDs to User
278+
Principal Names in the owner, group, and acl fields of
279+
:class:`~azure.storage.filedatalake.DirectoryProperties`. If False, the values will be returned
280+
as Azure Active Directory Object IDs. The default value is False. Note that group and application
281+
Object IDs are not translate because they do not have unique friendly names.
284282
:keyword int timeout:
285283
Sets the server-side timeout for the operation in seconds. For more details see
286284
https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.

sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_data_lake_file_client_async.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -281,22 +281,20 @@ async def get_file_properties(self, **kwargs):
281281
Use of customer-provided keys must be done over HTTPS.
282282
Required if the file was created with a customer-provided key.
283283
:keyword bool upn:
284-
Optional. Valid only when Hierarchical Namespace is
285-
enabled for the account. If "True", the user identity values returned
286-
in the x-ms-owner, x-ms-group, and x-ms-acl response headers will be
287-
transformed from Azure Active Directory Object IDs to User Principal
288-
Names. If "False", the values will be returned as Azure Active
289-
Directory Object IDs. The default value is false. Note that group and
290-
application Object IDs are not translated because they do not have
291-
unique friendly names.
284+
If True, the user identity values returned in the x-ms-owner, x-ms-group,
285+
and x-ms-acl response headers will be transformed from Azure Active Directory Object IDs to User
286+
Principal Names in the owner, group, and acl fields of
287+
:class:`~azure.storage.filedatalake.FileProperties`. If False, the values will be returned
288+
as Azure Active Directory Object IDs. The default value is False. Note that group and application
289+
Object IDs are not translate because they do not have unique friendly names.
292290
:keyword int timeout:
293291
Sets the server-side timeout for the operation in seconds. For more details see
294292
https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
295293
This value is not tracked or validated on the client. To configure client-side network timesouts
296294
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-file-datalake
297295
#other-client--per-operation-configuration>`_.
298296
:returns: All user-defined metadata, standard HTTP properties, and system properties for the file.
299-
:rtype: FileProperties
297+
:rtype: ~azure.storage.filedatalake.FileProperties
300298
301299
.. admonition:: Example:
302300

sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_file_system_client_async.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -511,14 +511,12 @@ def get_paths(
511511
number of items to return per page. If omitted or greater than 5,000, the
512512
response will include up to 5,000 items per page.
513513
:keyword bool upn:
514-
Optional. Valid only when Hierarchical Namespace is
515-
enabled for the account. If "True", the user identity values returned
516-
in the x-ms-owner, x-ms-group, and x-ms-acl response headers will be
517-
transformed from Azure Active Directory Object IDs to User Principal
518-
Names. If "False", the values will be returned as Azure Active
519-
Directory Object IDs. The default value is false. Note that group and
520-
application Object IDs are not translated because they do not have
521-
unique friendly names.
514+
If True, the user identity values returned in the x-ms-owner, x-ms-group,
515+
and x-ms-acl response headers will be transformed from Azure Active Directory Object IDs to User
516+
Principal Names in the owner, group, and acl fields of
517+
:class:`~azure.storage.filedatalake.PathProperties`. If False, the values will be returned
518+
as Azure Active Directory Object IDs. The default value is False. Note that group and application
519+
Object IDs are not translate because they do not have unique friendly names.
522520
:keyword int timeout:
523521
Sets the server-side timeout for the operation in seconds. For more details see
524522
https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.

sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_path_client_async.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -718,14 +718,12 @@ async def _get_path_properties(self, **kwargs):
718718
Use of customer-provided keys must be done over HTTPS.
719719
Required if the file/directory was created with a customer-provided key.
720720
:keyword bool upn:
721-
Optional. Valid only when Hierarchical Namespace is
722-
enabled for the account. If "True", the user identity values returned
723-
in the x-ms-owner, x-ms-group, and x-ms-acl response headers will be
724-
transformed from Azure Active Directory Object IDs to User Principal
725-
Names. If "False", the values will be returned as Azure Active
726-
Directory Object IDs. The default value is false. Note that group and
727-
application Object IDs are not translated because they do not have
728-
unique friendly names.
721+
If True, the user identity values returned in the x-ms-owner, x-ms-group,
722+
and x-ms-acl response headers will be transformed from Azure Active Directory Object IDs to User
723+
Principal Names in the owner, group, and acl fields of the respective property object returned.
724+
If False, the values will be returned as Azure Active Directory Object IDs.
725+
The default value is False. Note that group and application Object IDs are not translate
726+
because they do not have unique friendly names.
729727
:keyword int timeout:
730728
Sets the server-side timeout for the operation in seconds. For more details see
731729
https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.

0 commit comments

Comments
 (0)