Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Pylint/black happyness
  • Loading branch information
lmazuel committed Jul 31, 2019
commit d8bc07e13a860a4bf16fbc46915fe54cb6504067
13 changes: 8 additions & 5 deletions sdk/core/azure-core/azure/core/async_paging.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,14 @@ async def __anext__(self) -> ReturnType:

class AsyncPageIterator(AsyncIterator[AsyncIterator[ReturnType]]):
def __init__(
self,
get_next: Callable[[Optional[str]], Awaitable[ResponseType]],
extract_data: Callable[
self, # pylint: disable=bad-continuation
get_next: Callable[ # pylint: disable=bad-continuation
[Optional[str]], Awaitable[ResponseType]
], # pylint: disable=bad-continuation
extract_data: Callable[ # pylint: disable=bad-continuation
[ResponseType], Awaitable[Tuple[str, AsyncIterator[ReturnType]]]
],
continuation_token: Optional[str] = None,
continuation_token: Optional[str] = None, # pylint: disable=bad-continuation
) -> None:
"""Return an async iterator of pages.

Expand Down Expand Up @@ -120,7 +122,8 @@ def __init__(self, *args, **kwargs) -> None:
)

def by_page(
self, continuation_token: Optional[str] = None
self, # pylint: disable=bad-continuation
continuation_token: Optional[str] = None, # pylint: disable=bad-continuation
) -> AsyncIterator[AsyncIterator[ReturnType]]:
"""Get an async iterator of pages of objects, instead of an async iterator of objects.

Expand Down
12 changes: 6 additions & 6 deletions sdk/core/azure-core/azure/core/paging.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
#
# --------------------------------------------------------------------------
import itertools
from typing import (
from typing import ( # pylint: disable=unused-import
Callable,
Optional,
TypeVar,
Iterator,
Iterable,
Tuple,
) # pylint: disable=unused-import
)
import logging


Expand All @@ -43,10 +43,10 @@

class PageIterator(Iterator[Iterator[ReturnType]]):
def __init__(
self,
get_next, # type: Callable[[Optional[str]], ResponseType]
extract_data, # type: Callable[[ResponseType], Tuple[str, Iterable[ReturnType]]]
continuation_token=None, # type: Optional[str]
self, # pylint: disable=bad-continuation
get_next, # type: Callable[[Optional[str]], ResponseType] # pylint: disable=bad-continuation
extract_data, # type: Callable[[ResponseType], Tuple[str, Iterable[ReturnType]]] # pylint: disable=bad-continuation
continuation_token=None, # type: Optional[str] # pylint: disable=bad-continuation
):
"""Return an iterator of pages.

Expand Down