mirror of
https://github.com/ihabunek/toot.git
synced 2025-06-30 22:18:36 -04:00
Style fixes
This commit is contained in:
parent
0285b4ce39
commit
e1f870d27a
@ -8,6 +8,7 @@ from toot.cli import Context, cli, json_option, pass_context
|
||||
from toot.entities import List, from_dict_list
|
||||
from toot.output import print_list_accounts, print_lists, print_warning
|
||||
|
||||
|
||||
@cli.group()
|
||||
def lists():
|
||||
pass
|
||||
|
@ -513,6 +513,7 @@ def from_response_list(cls: Type[T], response: Response) -> t.List[T]:
|
||||
"""Convert a list of nested dicts extracted from response body into a list of `cls` instances."""
|
||||
return from_dict_list(cls, response.json())
|
||||
|
||||
|
||||
def from_responses_batched(
|
||||
responses: t.Iterable[Response],
|
||||
cls: Type[T],
|
||||
|
@ -169,6 +169,7 @@ def get_version(name):
|
||||
|
||||
T = TypeVar("T")
|
||||
|
||||
|
||||
def batched(iterable: Iterable[T], n: int) -> Generator[List[T], None, None]:
|
||||
"""Batch data from the iterable into lists of length n. The last batch may
|
||||
be shorter than n."""
|
||||
|
Loading…
x
Reference in New Issue
Block a user