mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-16 00:37:11 +08:00
third iteration of stubs
This commit is contained in:
@@ -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: ...
|
||||
|
||||
Reference in New Issue
Block a user