Skip to content

Commit

Permalink
Fix batch docstrings (Azure#7600)
Browse files Browse the repository at this point in the history
* Fix batch docstrings

* pylint
  • Loading branch information
lmazuel authored Oct 4, 2019
1 parent cb7cfdc commit 637535e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -790,13 +790,12 @@ async def delete_blob(

@distributed_trace_async
async def delete_blobs( # pylint: disable=arguments-differ
self, *blobs, # type: Union[str, BlobProperties]
delete_snapshots=None, # type: Optional[str]
lease=None, # type: Optional[Union[str, LeaseClient]]
timeout=None, # type: Optional[int]
self, *blobs: Union[str, BlobProperties],
delete_snapshots: Optional[str] = None,
lease: Optional[Union[str, LeaseClient]] = None,
timeout: Optional[int] = None,
**kwargs
):
# type: (...) -> None
) -> AsyncIterator[AsyncHttpResponse]:
"""Marks the specified blobs or snapshots for deletion.
The blob is later deleted during garbage collection.
Expand Down Expand Up @@ -848,7 +847,8 @@ async def delete_blobs( # pylint: disable=arguments-differ
operation if it does exist.
:param int timeout:
The timeout parameter is expressed in seconds.
:rtype: None
:return: An async iterator of responses, one for each blob in order
:rtype: asynciterator[~azure.core.pipeline.transport.AsyncHttpResponse]
"""
options = BlobClient._generic_delete_blob_options( # pylint: disable=protected-access
delete_snapshots=delete_snapshots,
Expand Down Expand Up @@ -902,7 +902,8 @@ async def set_standard_blob_tier_blobs(
Required if the blob has an active lease. Value can be a LeaseClient object
or the lease ID as a string.
:type lease: ~azure.storage.blob.lease.LeaseClient or str
:rtype: None
:return: An async iterator of responses, one for each blob in order
:rtype: asynciterator[~azure.core.pipeline.transport.AsyncHttpResponse]
"""
access_conditions = get_access_conditions(kwargs.pop('lease', None))
if standard_blob_tier is None:
Expand Down Expand Up @@ -954,7 +955,8 @@ async def set_premium_page_blob_tier_blobs(
Required if the blob has an active lease. Value can be a LeaseClient object
or the lease ID as a string.
:type lease: ~azure.storage.blob.lease.LeaseClient or str
:rtype: None
:return: An async iterator of responses, one for each blob in order
:rtype: asynciterator[~azure.core.pipeline.transport.AsyncHttpResponse]
"""
access_conditions = get_access_conditions(kwargs.pop('lease', None))
if premium_page_blob_tier is None:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import functools
from typing import ( # pylint: disable=unused-import
Union, Optional, Any, Iterable, AnyStr, Dict, List, Tuple, IO,
Union, Optional, Any, Iterable, AnyStr, Dict, List, Tuple, IO, Iterator,
TYPE_CHECKING
)

Expand Down Expand Up @@ -46,7 +46,7 @@
from ._shared_access_signature import BlobSharedAccessSignature

if TYPE_CHECKING:
from azure.core.pipeline.transport import HttpTransport # pylint: disable=ungrouped-imports
from azure.core.pipeline.transport import HttpTransport, HttpResponse # pylint: disable=ungrouped-imports
from azure.core.pipeline.policies import HTTPPolicy # pylint: disable=ungrouped-imports
from .models import ContainerSasPermissions, PublicAccess
from datetime import datetime
Expand Down Expand Up @@ -1028,7 +1028,7 @@ def _generate_delete_blobs_options(

@distributed_trace
def delete_blobs(self, *blobs, **kwargs):
# type: (...) -> None
# type: (...) -> Iterator[HttpResponse]
"""Marks the specified blobs or snapshots for deletion.
The blob is later deleted during garbage collection.
Expand Down Expand Up @@ -1079,7 +1079,8 @@ def delete_blobs(self, *blobs, **kwargs):
operation if it does exist.
:param int timeout:
The timeout parameter is expressed in seconds.
:rtype: None
:return: An iterator of responses, one for each blob in order
:rtype: iterator[~azure.core.pipeline.transport.HttpResponse]
"""
options = BlobClient._generic_delete_blob_options( # pylint: disable=protected-access
**kwargs
Expand Down Expand Up @@ -1164,7 +1165,8 @@ def set_standard_blob_tier_blobs(
Required if the blob has an active lease. Value can be a LeaseClient object
or the lease ID as a string.
:type lease: ~azure.storage.blob.lease.LeaseClient or str
:rtype: None
:return: An iterator of responses, one for each blob in order
:rtype: iterator[~azure.core.pipeline.transport.HttpResponse]
"""
access_conditions = get_access_conditions(kwargs.pop('lease', None))
if standard_blob_tier is None:
Expand Down Expand Up @@ -1217,7 +1219,8 @@ def set_premium_page_blob_tier_blobs(
Required if the blob has an active lease. Value can be a LeaseClient object
or the lease ID as a string.
:type lease: ~azure.storage.blob.lease.LeaseClient or str
:rtype: None
:return: An iterator of responses, one for each blob in order
:rtype: iterator[~azure.core.pipeline.transport.HttpResponse]
"""
access_conditions = get_access_conditions(kwargs.pop('lease', None))
if premium_page_blob_tier is None:
Expand Down
4 changes: 2 additions & 2 deletions sdk/storage/azure-storage-blob/azure/storage/blob/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,8 @@ class ContainerProperties(DictMixin):
:param dict metadata: A dict with name-value pairs to associate with the
container as metadata.
Returned ``ContainerProperties`` instances expose these values through a
dictionary interface, for example: ``container_props["last_modified"]``.
Returned ``ContainerProperties`` instances expose these values through a
dictionary interface, for example: ``container_props["last_modified"]``.
Additionally, the container name is available as ``container_props["name"]``.
"""

Expand Down

0 comments on commit 637535e

Please sign in to comment.