Skip to content

Commit e760add

Browse files
authored
Some doc fixes in file datalake (Azure#41320)
* Some doc fixes * update * updates * update
1 parent 5a3a3d0 commit e760add

File tree

9 files changed

+29
-26
lines changed

9 files changed

+29
-26
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ def upload_data(
461461
A callback to track the progress of a long-running upload. The signature is
462462
function(current: int, total: int) where current is the number of bytes transferred
463463
so far, and total is the total size of the download.
464-
:paramtype progress_hook: Callable[[int, int], None]
464+
:paramtype progress_hook: ~typing.Callable[[int, int], None]
465465
:returns: A dictionary of response headers.
466466
:rtype: Dict[str, Any]
467467
"""
@@ -692,7 +692,7 @@ def download_file(
692692
A callback to track the progress of a long-running download. The signature is
693693
function(current: int, total: int) where current is the number of bytes transferred
694694
so far, and total is the total size of the download.
695-
:paramtype progress_hook: Callable[[int, int], None]
695+
:paramtype progress_hook: ~typing.Callable[[int, int], None]
696696
:keyword int timeout:
697697
Sets the server-side timeout for the operation in seconds. For more details see
698698
https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
@@ -821,8 +821,9 @@ def query_file(self, query_expression: str, **kwargs: Any) -> DataLakeFileQueryR
821821
:param str query_expression:
822822
Required. a query statement.
823823
eg. Select * from DataLakeStorage
824-
:keyword Callable[~azure.storage.filedatalake.DataLakeFileQueryError] on_error:
824+
:keyword on_error:
825825
A function to be called on any processing errors returned by the service.
826+
:paramtype on_error: ~typing.Callable[~azure.storage.filedatalake.DataLakeFileQueryError]
826827
:keyword file_format:
827828
Optional. Defines the serialization of the data currently stored in the file. The default is to
828829
treat the file data as CSV data formatted in the default dialect. This can be overridden with

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,7 @@ def create_directory(
688688
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-file-datalake
689689
#other-client--per-operation-configuration>`_.
690690
:returns: DataLakeDirectoryClient with new directory and metadata.
691-
:rtype: ~azure.storage.file.datalake.DataLakeDirectoryClient
691+
:rtype: ~azure.storage.filedatalake.DataLakeDirectoryClient
692692
693693
.. admonition:: Example:
694694
@@ -743,7 +743,7 @@ def delete_directory( # pylint: disable=delete-operation-wrong-return-type
743743
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-file-datalake
744744
#other-client--per-operation-configuration>`_.
745745
:returns: DataLakeDirectoryClient after deleting specified directory.
746-
:rtype: ~azure.storage.file.datalake.DataLakeDirectoryClient
746+
:rtype: ~azure.storage.filedatalake.DataLakeDirectoryClient
747747
748748
.. admonition:: Example:
749749
@@ -843,7 +843,7 @@ def create_file(
843843
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-file-datalake
844844
#other-client--per-operation-configuration>`_.
845845
:returns: DataLakeFileClient with new file created.
846-
:rtype: ~azure.storage.file.datalake.DataLakeFileClient
846+
:rtype: ~azure.storage.filedatalake.DataLakeFileClient
847847
848848
.. admonition:: Example:
849849
@@ -898,7 +898,7 @@ def delete_file( # pylint: disable=delete-operation-wrong-return-type
898898
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-file-datalake
899899
#other-client--per-operation-configuration>`_.
900900
:return: DataLakeFileClient after deleting specified file.
901-
:rtype: azure.storage.file.datalake.DataLakeFileClient
901+
:rtype: azure.storage.filedatalake.DataLakeFileClient
902902
903903
.. admonition:: Example:
904904
@@ -937,7 +937,7 @@ def _undelete_path(
937937
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-file-datalake
938938
#other-client--per-operation-configuration>`_.
939939
:returns: Returns the DataLake client for the restored soft-deleted path.
940-
:rtype: ~azure.storage.file.datalake.DataLakeDirectoryClient or azure.storage.file.datalake.DataLakeFileClient
940+
:rtype: ~azure.storage.filedatalake.DataLakeDirectoryClient or azure.storage.filedatalake.DataLakeFileClient
941941
"""
942942
_, url, undelete_source = _undelete_path_options(deleted_path_name, deletion_id, self.url)
943943

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -755,7 +755,8 @@ def _convert_from_container_props(cls, container_properties):
755755
class FileSystemPropertiesPaged(ContainerPropertiesPaged):
756756
"""An Iterable of File System properties.
757757
758-
:param callable command: Function to retrieve the next page of items.
758+
:param command: Function to retrieve the next page of items.
759+
:type command: ~typing.Callable[]
759760
:param str prefix: Filters the results to return only file systems whose names
760761
begin with the specified prefix.
761762
:param int results_per_page: The maximum number of file system names to retrieve per call.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ def generate_account(
161161
:param sts_hook:
162162
For debugging purposes only. If provided, the hook is called with the string to sign
163163
that was used to generate the SAS.
164-
:type sts_hook: Optional[Callable[[str], None]]
164+
:type sts_hook: Optional[~typing.Callable[[str], None]]
165165
:returns: The generated SAS token for the account.
166166
:rtype: str
167167
"""

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def generate_account_sas(
8585
:keyword sts_hook:
8686
For debugging purposes only. If provided, the hook is called with the string to sign
8787
that was used to generate the SAS.
88-
:paramtype sts_hook: Callable[[str], None] or None
88+
:paramtype sts_hook: ~typing.Callable[[str], None] or None
8989
:return: A Shared Access Signature (sas) token.
9090
:rtype: str
9191
"""
@@ -196,7 +196,7 @@ def generate_file_system_sas(
196196
:keyword sts_hook:
197197
For debugging purposes only. If provided, the hook is called with the string to sign
198198
that was used to generate the SAS.
199-
:paramtype sts_hook: Callable[[str], None] or None
199+
:paramtype sts_hook: ~typing.Callable[[str], None] or None
200200
:return: A Shared Access Signature (sas) token.
201201
:rtype: str
202202
"""
@@ -310,7 +310,7 @@ def generate_directory_sas(
310310
:keyword sts_hook:
311311
For debugging purposes only. If provided, the hook is called with the string to sign
312312
that was used to generate the SAS.
313-
:paramtype sts_hook: Callable[[str], None] or None
313+
:paramtype sts_hook: ~typing.Callable[[str], None] or None
314314
:return: A Shared Access Signature (sas) token.
315315
:rtype: str
316316
"""
@@ -431,7 +431,7 @@ def generate_file_sas(
431431
:keyword sts_hook:
432432
For debugging purposes only. If provided, the hook is called with the string to sign
433433
that was used to generate the SAS.
434-
:paramtype sts_hook: Callable[[str], None] or None
434+
:paramtype sts_hook: ~typing.Callable[[str], None] or None
435435
:return: A Shared Access Signature (sas) token.
436436
:rtype: str
437437
"""

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ async def upload_data(
477477
A callback to track the progress of a long-running upload. The signature is
478478
function(current: int, total: int) where current is the number of bytes transferred
479479
so far, and total is the total size of the download.
480-
:paramtype progress_hook: Callable[[int, Optional[int]], Awaitable[None]]
480+
:paramtype progress_hook: ~typing.Callable[[int, Optional[int]], Awaitable[None]]
481481
:returns: A dictionary of response headers.
482482
:rtype: Dict[str, Any]
483483
"""
@@ -708,7 +708,7 @@ async def download_file(
708708
A callback to track the progress of a long-running download. The signature is
709709
function(current: int, total: int) where current is the number of bytes transferred
710710
so far, and total is the total size of the download.
711-
:paramtype progress_hook: Callable[[int, Optional[int]], Awaitable[None]]
711+
:paramtype progress_hook: ~typing.Callable[[int, Optional[int]], Awaitable[None]]
712712
:keyword int timeout:
713713
Sets the server-side timeout for the operation in seconds. For more details see
714714
https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -692,7 +692,7 @@ async def create_directory(
692692
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-file-datalake
693693
#other-client--per-operation-configuration>`_.
694694
:returns: DataLakeDirectoryClient with new directory and metadata.
695-
:rtype: ~azure.storage.file.datalake.aio.DataLakeDirectoryClient
695+
:rtype: ~azure.storage.filedatalake.aio.DataLakeDirectoryClient
696696
697697
.. admonition:: Example:
698698
@@ -747,7 +747,7 @@ async def delete_directory(
747747
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-file-datalake
748748
#other-client--per-operation-configuration>`_.
749749
:returns: DataLakeDirectoryClient after deleting specified directory.
750-
:rtype: ~azure.storage.file.datalake.aio.DataLakeDirectoryClient
750+
:rtype: ~azure.storage.filedatalake.aio.DataLakeDirectoryClient
751751
752752
.. admonition:: Example:
753753
@@ -847,7 +847,7 @@ async def create_file(
847847
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-file-datalake
848848
#other-client--per-operation-configuration>`_.
849849
:returns: DataLakeFileClient with new file created.
850-
:rtype: ~azure.storage.file.datalake.aio.DataLakeFileClient
850+
:rtype: ~azure.storage.filedatalake.aio.DataLakeFileClient
851851
852852
.. admonition:: Example:
853853
@@ -902,7 +902,7 @@ async def delete_file(
902902
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-file-datalake
903903
#other-client--per-operation-configuration>`_.
904904
:return: DataLakeFileClient after deleting specified file.
905-
:rtype: ~azure.storage.file.datalake.aio.DataLakeFileClient
905+
:rtype: ~azure.storage.filedatalake.aio.DataLakeFileClient
906906
907907
.. literalinclude:: ../samples/datalake_samples_file_system_async.py
908908
:start-after: [START delete_file_from_file_system]
@@ -940,8 +940,8 @@ async def _undelete_path(
940940
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-file-datalake
941941
#other-client--per-operation-configuration>`_.
942942
:returns: Returns the DataLake client for the restored soft-deleted path.
943-
:rtype: ~azure.storage.file.datalake.aio.DataLakeDirectoryClient or
944-
~azure.storage.file.datalake.aio.DataLakeFileClient
943+
:rtype: ~azure.storage.filedatalake.aio.DataLakeDirectoryClient or
944+
~azure.storage.filedatalake.aio.DataLakeFileClient
945945
"""
946946
_, url, undelete_source = _undelete_path_options(deleted_path_name, deletion_id, self.url)
947947

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
class FileSystemPropertiesPaged(ContainerPropertiesPaged):
1515
"""An Iterable of File System properties.
1616
17-
:param callable command: Function to retrieve the next page of items.
17+
:param command: Function to retrieve the next page of items.
18+
:paramtype command: ~typing.Callable[]
1819
:param str prefix: Filters the results to return only file systems whose names
1920
begin with the specified prefix.
2021
:param int results_per_page: The maximum number of file system names to retrieve per call.

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ async def set_access_control_recursive(self, acl: str, **kwargs: Any) -> AccessC
490490
#other-client--per-operation-configuration>`_.
491491
:return: A summary of the recursive operations, including the count of successes and failures,
492492
as well as a continuation token in case the operation was terminated prematurely.
493-
:rtype: :~azure.storage.filedatalake.AccessControlChangeResult`
493+
:rtype: ~azure.storage.filedatalake.AccessControlChangeResult
494494
:raises ~azure.core.exceptions.AzureError:
495495
User can restart the operation using continuation_token field of AzureError if the token is available.
496496
"""
@@ -544,7 +544,7 @@ async def update_access_control_recursive(self, acl: str, **kwargs: Any) -> Acce
544544
#other-client--per-operation-configuration>`_.
545545
:return: A summary of the recursive operations, including the count of successes and failures,
546546
as well as a continuation token in case the operation was terminated prematurely.
547-
:rtype: :~azure.storage.filedatalake.AccessControlChangeResult`
547+
:rtype: ~azure.storage.filedatalake.AccessControlChangeResult
548548
:raises ~azure.core.exceptions.AzureError:
549549
User can restart the operation using continuation_token field of AzureError if the token is available.
550550
"""
@@ -596,7 +596,7 @@ async def remove_access_control_recursive(self, acl: str, **kwargs: Any) -> Acce
596596
#other-client--per-operation-configuration>`_.
597597
:return: A summary of the recursive operations, including the count of successes and failures,
598598
as well as a continuation token in case the operation was terminated prematurely.
599-
:rtype: :~azure.storage.filedatalake.AccessControlChangeResult`
599+
:rtype: ~azure.storage.filedatalake.AccessControlChangeResult
600600
:raises ~azure.core.exceptions.AzureError:
601601
User can restart the operation using continuation_token field of AzureError if the token is available.
602602
"""

0 commit comments

Comments
 (0)