third iteration of stubs

This commit is contained in:
Maxim Kurnikov
2018-08-11 00:19:50 +03:00
parent fa718b8e55
commit c6bceb19f4
216 changed files with 16306 additions and 3006 deletions

View File

@@ -18,15 +18,17 @@ class Paginator:
def __init__(
self,
object_list: Union[
QuerySet, List[int], List[Dict[str, str]], str, List[Model]
List[Dict[str, str]], List[Model], List[int], QuerySet, str
],
per_page: Union[str, int],
per_page: Union[int, str],
orphans: int = ...,
allow_empty_first_page: bool = ...,
) -> None: ...
def validate_number(self, number: Optional[Union[float, str]]) -> int: ...
def validate_number(
self, number: Optional[Union[float, int, str]]
) -> int: ...
def get_page(self, number: Optional[int]) -> Page: ...
def page(self, number: Union[str, int]) -> Page: ...
def page(self, number: Union[int, str]) -> Page: ...
def count(self) -> int: ...
def num_pages(self) -> int: ...
@property
@@ -41,13 +43,13 @@ class Page(collections.abc.Sequence):
def __init__(
self,
object_list: Union[
QuerySet, List[int], List[Dict[str, str]], str, List[Model]
List[Dict[str, str]], List[Model], List[int], QuerySet, str
],
number: int,
paginator: Paginator,
) -> None: ...
def __len__(self) -> int: ...
def __getitem__(self, index: Union[str, int]) -> Union[Model, str]: ...
def __getitem__(self, index: Union[int, str]) -> Union[Model, str]: ...
def has_next(self) -> bool: ...
def has_previous(self) -> bool: ...
def has_other_pages(self) -> bool: ...