-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
PaginatedList.pyi
42 lines (37 loc) · 1.44 KB
/
PaginatedList.pyi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
from typing import Any, Dict, Generic, Iterator, List, Optional, Type, TypeVar, Union
from github.ContentFile import ContentFile
from github.GithubObject import GithubObject
from github.Issue import Issue
from github.NamedUser import NamedUser
from github.Requester import Requester
T = TypeVar("T", bound=GithubObject)
class PaginatedListBase(Generic[T]):
def __getitem__(self, index: Union[int, slice]) -> Any: ...
def __init__(self) -> None: ...
def __iter__(self) -> Iterator[T]: ...
def _grow(self) -> Any: ...
def _isBiggerThan(self, index: int) -> bool: ...
class _Slice:
def __init__(self, theList: PaginatedList[T], theSlice: slice) -> None: ...
def __iter__(self) -> Iterator[T]: ...
def __finished(self, index: int) -> bool: ...
class PaginatedList(PaginatedListBase[T]):
def __init__(
self,
contentClass: Type[T],
requester: Requester,
firstUrl: str,
firstParams: Any,
headers: Optional[Dict[str, str]] = ...,
list_item: str = ...,
) -> None: ...
def __reverse(self) -> None: ...
def __parseLinkHeader(self, headers: Dict[str, str]) -> None: ...
def _couldGrow(self) -> bool: ...
def _fetchNextPage(self) -> Any: ...
def _getLastPageUrl(self) -> Optional[str]: ...
def get_page(self, page: int) -> List[Any]: ...
@property
def reversed(self) -> PaginatedList[T]: ...
@property
def totalCount(self) -> int: ...