Skip to content

Commit

Permalink
[Storage] Update DataLake docstrings for create_directory and delete_…
Browse files Browse the repository at this point in the history
…directory (Azure#24567)
  • Loading branch information
vincenttran-msft authored May 25, 2022
1 parent 4a1760f commit ef2609e
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ def from_connection_string(
an instance of a AzureSasCredential from azure.core.credentials, and account shared access
key, or an instance of a TokenCredentials class from azure.identity.
Credentials provided here will take precedence over those in the connection string.
:return a DataLakeDirectoryClient
:rtype ~azure.storage.filedatalake.DataLakeDirectoryClient
:return: a DataLakeDirectoryClient
:rtype: ~azure.storage.filedatalake.DataLakeDirectoryClient
"""
account_url, _, credential = parse_connection_str(conn_str, credential, 'dfs')
return cls(
Expand Down Expand Up @@ -162,7 +162,8 @@ def create_directory(self, metadata=None, # type: Optional[Dict[str, str]]
Use of customer-provided keys must be done over HTTPS.
:keyword int timeout:
The timeout parameter is expressed in seconds.
:return: response dict (Etag and last modified).
:return: A dictionary of response headers.
:rtype: Dict[str, Union[str, datetime]]
.. admonition:: Example:
Expand All @@ -176,7 +177,7 @@ def create_directory(self, metadata=None, # type: Optional[Dict[str, str]]
return self._create('directory', metadata=metadata, **kwargs)

def delete_directory(self, **kwargs):
# type: (...) -> None
# type: (...) -> Dict[str, Union[str, datetime]]
"""
Marks the specified directory for deletion.
Expand All @@ -203,7 +204,8 @@ def delete_directory(self, **kwargs):
The match condition to use upon the etag.
:keyword int timeout:
The timeout parameter is expressed in seconds.
:return: None
:return: A dictionary of response headers.
:rtype: Dict[str, Union[str, datetime]]
.. admonition:: Example:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,8 @@ def _create(self, resource_type, content_settings=None, metadata=None, **kwargs)
Use of customer-provided keys must be done over HTTPS.
:keyword int timeout:
The timeout parameter is expressed in seconds.
:return: Dict[str, Union[str, datetime]]
:return: A dictionary of response headers.
:rtype: Dict[str, Union[str, datetime]]
"""
options = self._create_path_options(
resource_type,
Expand Down Expand Up @@ -289,7 +290,8 @@ def _delete(self, **kwargs):
The match condition to use upon the etag.
:param int timeout:
The timeout parameter is expressed in seconds.
:return: None
:return: A dictionary of response headers.
:rtype: Dict[str, Union[str, datetime]]
"""
options = self._delete_path_options(**kwargs)
try:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ async def create_directory(self, metadata=None, # type: Optional[Dict[str, str]
Use of customer-provided keys must be done over HTTPS.
:keyword int timeout:
The timeout parameter is expressed in seconds.
:return: response dict (Etag and last modified).
:return: A dictionary of response headers.
:rtype: Dict[str, Union[str, datetime]]
.. admonition:: Example:
Expand All @@ -153,7 +154,7 @@ async def exists(self, **kwargs):
return await self._exists(**kwargs)

async def delete_directory(self, **kwargs):
# type: (...) -> None
# type: (...) -> Dict[str, Union[str, datetime]]
"""
Marks the specified directory for deletion.
Expand All @@ -180,7 +181,8 @@ async def delete_directory(self, **kwargs):
The match condition to use upon the etag.
:keyword int timeout:
The timeout parameter is expressed in seconds.
:return: None
:return: A dictionary of response headers.
:rtype: Dict[str, Union[str, datetime]]
.. admonition:: Example:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ async def _create(self, resource_type, content_settings=None, metadata=None, **k
Use of customer-provided keys must be done over HTTPS.
:keyword int timeout:
The timeout parameter is expressed in seconds.
:return: Dict[str, Union[str, datetime]]
:return: A dictionary of response headers.
:rtype: Dict[str, Union[str, datetime]]
"""
options = self._create_path_options(
resource_type,
Expand Down Expand Up @@ -197,7 +198,8 @@ async def _delete(self, **kwargs):
The match condition to use upon the etag.
:keyword int timeout:
The timeout parameter is expressed in seconds.
:return: None
:return: A dictionary of response headers.
:rtype: Dict[str, Union[str, datetime]]
"""
options = self._delete_path_options(**kwargs)
try:
Expand Down

0 comments on commit ef2609e

Please sign in to comment.