| 1 |
from typing import TypeVar, Generic, Iterable, Iterator, Mapping, Tuple, overload, Optional, Union, Any |
| 2 |
|
| 3 |
T = TypeVar('T') |
| 4 |
KT = TypeVar('KT') |
| 5 |
VT = TypeVar('VT') |
| 6 |
|
| 7 |
class object: |
| 8 |
def __init__(self) -> None: pass |
| 9 |
|
| 10 |
class type: |
| 11 |
def __init__(self, x: Any) -> None: pass |
| 12 |
|
| 13 |
class str: |
| 14 |
def __add__(self, other: 'str') -> 'str': pass |
| 15 |
def __rmul__(self, n: int) -> str: ... |
| 16 |
|
| 17 |
class bytes: pass |
| 18 |
|
| 19 |
class tuple(Generic[T]): pass |
| 20 |
class slice: pass |
| 21 |
class function: pass |
| 22 |
|
| 23 |
class ellipsis: pass |
| 24 |
|
| 25 |
class list(Iterable[T], Generic[T]): |
| 26 |
@overload |
| 27 |
def __init__(self) -> None: pass |
| 28 |
@overload |
| 29 |
def __init__(self, x: Iterable[T]) -> None: pass |
| 30 |
def __iter__(self) -> Iterator[T]: pass |
| 31 |
def __add__(self, x: list[T]) -> list[T]: pass |
| 32 |
def __mul__(self, x: int) -> list[T]: pass |
| 33 |
def __getitem__(self, x: int) -> T: pass |
| 34 |
def append(self, x: T) -> None: pass |
| 35 |
def extend(self, x: Iterable[T]) -> None: pass |
| 36 |
|
| 37 |
class dict(Mapping[KT, VT], Generic[KT, VT]): |
| 38 |
@overload |
| 39 |
def __init__(self, **kwargs: VT) -> None: pass |
| 40 |
@overload |
| 41 |
def __init__(self, arg: Iterable[Tuple[KT, VT]], **kwargs: VT) -> None: pass |
| 42 |
def __setitem__(self, k: KT, v: VT) -> None: pass |
| 43 |
def __getitem__(self, k: KT) -> VT: pass |
| 44 |
def __iter__(self) -> Iterator[KT]: pass |
| 45 |
def update(self, a: Mapping[KT, VT]) -> None: pass |
| 46 |
@overload |
| 47 |
def get(self, key: KT, default: None = None, /) -> Optional[VT]: pass |
| 48 |
@overload |
| 49 |
def get(self, key: KT, default: VT, /) -> VT: pass |
| 50 |
@overload |
| 51 |
def get(self, key: KT, default: T, /) -> Union[VT, T]: pass |
| 52 |
|
| 53 |
|
| 54 |
class int: |
| 55 |
def __float__(self) -> float: ... |
| 56 |
def __int__(self) -> int: ... |
| 57 |
def __mul__(self, x: int) -> int: ... |
| 58 |
def __rmul__(self, x: int) -> int: ... |
| 59 |
def __truediv__(self, x: int) -> int: ... |
| 60 |
def __rtruediv__(self, x: int) -> int: ... |
| 61 |
|
| 62 |
class float: |
| 63 |
def __float__(self) -> float: ... |
| 64 |
def __int__(self) -> int: ... |
| 65 |
def __mul__(self, x: float) -> float: ... |
| 66 |
def __rmul__(self, x: float) -> float: ... |
| 67 |
def __truediv__(self, x: float) -> float: ... |
| 68 |
def __rtruediv__(self, x: float) -> float: ... |