reformat with black

This commit is contained in:
Maxim Kurnikov
2018-07-29 23:34:58 +03:00
parent 4866354600
commit cf85607969
343 changed files with 6054 additions and 2158 deletions

View File

@@ -8,6 +8,7 @@ from typing import Any
from django.db.models.base import Model
from django.db.models.query import QuerySet
from typing import List, Optional, Union
class UnorderedObjectListWarning(RuntimeWarning): ...
class InvalidPage(Exception): ...
class PageNotAnInteger(InvalidPage): ...
@@ -18,7 +19,13 @@ class Paginator:
per_page: Any = ...
orphans: Any = ...
allow_empty_first_page: Any = ...
def __init__(self, object_list: Union[List[int], QuerySet, List[object]], per_page: Union[str, int], orphans: Union[str, int] = ..., allow_empty_first_page: bool = ...) -> None: ...
def __init__(
self,
object_list: Union[List[int], QuerySet, List[object]],
per_page: Union[str, int],
orphans: Union[str, int] = ...,
allow_empty_first_page: bool = ...,
) -> None: ...
def validate_number(self, number: Optional[Union[float, str]]) -> int: ...
def get_page(self, number: Optional[int]) -> Page: ...
def page(self, number: Union[str, int]) -> Page: ...
@@ -28,13 +35,19 @@ class Paginator:
@property
def page_range(self) -> range: ...
def _check_object_list_is_ordered(self) -> None: ...
QuerySetPaginator = Paginator
class Page(collections.abc.Sequence):
object_list: Any = ...
number: Any = ...
paginator: Any = ...
def __init__(self, object_list: Union[List[int], str, List[object], QuerySet], number: int, paginator: Paginator) -> None: ...
def __init__(
self,
object_list: Union[List[int], str, List[object], QuerySet],
number: int,
paginator: Paginator,
) -> None: ...
def __repr__(self) -> str: ...
def __len__(self): ...
def __getitem__(self, index: Union[slice, int]) -> Union[List[Model], str]: ...