fixes for ci imports failures

This commit is contained in:
Maxim Kurnikov
2019-01-06 21:00:01 +03:00
parent 5ba0bbe0b7
commit 98e60d084f
84 changed files with 449 additions and 1383 deletions

View File

@@ -1,5 +1,4 @@
import collections.abc
from typing import Dict, List, Optional, Union
from typing import Dict, List, Optional, Union, Iterable, Sequence
from django.db.models.base import Model
from django.db.models.query import QuerySet
@@ -15,11 +14,7 @@ class Paginator:
orphans: int = ...
allow_empty_first_page: bool = ...
def __init__(
self,
object_list: Union[List[Dict[str, str]], List[Model], List[int], QuerySet, str],
per_page: Union[int, str],
orphans: int = ...,
allow_empty_first_page: bool = ...,
self, object_list: Iterable, per_page: Union[int, str], orphans: 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: ...
@@ -31,7 +26,7 @@ class Paginator:
QuerySetPaginator = Paginator
class Page(collections.abc.Sequence):
class Page(Sequence):
object_list: QuerySet = ...
number: int = ...
paginator: Paginator = ...
@@ -41,8 +36,8 @@ class Page(collections.abc.Sequence):
number: int,
paginator: Paginator,
) -> None: ...
def __len__(self) -> int: ...
def __getitem__(self, index: Union[int, str]) -> Union[Model, str]: ...
def __getitem__(self, item): ...
def __len__(self): ...
def has_next(self) -> bool: ...
def has_previous(self) -> bool: ...
def has_other_pages(self) -> bool: ...