-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Expand file tree
/
Copy pathprimitives.pyi
More file actions
84 lines (77 loc) · 3.19 KB
/
primitives.pyi
File metadata and controls
84 lines (77 loc) · 3.19 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# builtins stub with non-generic primitive types
import _typeshed
from typing import Generic, TypeVar, Sequence, Iterator, Mapping, Iterable, Tuple, Union
T = TypeVar('T')
V = TypeVar('V')
class object:
def __init__(self) -> None: pass
def __str__(self) -> str: pass
def __eq__(self, other: object) -> bool: pass
def __ne__(self, other: object) -> bool: pass
class type:
def __init__(self, x: object) -> None: pass
# Real implementation returns UnionType
def __or__(self, value: object, /) -> object: pass
class int:
# Note: this is a simplification of the actual signature
def __init__(self, x: object = ..., base: int = ...) -> None: pass
def __add__(self, i: int) -> int: pass
def __rmul__(self, x: int) -> int: pass
def __bool__(self) -> bool: pass
class float:
def __float__(self) -> float: pass
def __add__(self, x: float) -> float: pass
def hex(self) -> str: pass
class complex:
def __add__(self, x: complex) -> complex: pass
class bool(int): pass
class str(Sequence[str]):
def __add__(self, s: str) -> str: pass
def __iter__(self) -> Iterator[str]: pass
def __contains__(self, other: object) -> bool: pass
def __getitem__(self, item: int) -> str: pass
def format(self, *args: object, **kwargs: object) -> str: pass
# Note: this is a simplification of the actual signature
def split(self, sep: str | None = None) -> list[str]: pass
class bytes(Sequence[int]):
def __iter__(self) -> Iterator[int]: pass
def __contains__(self, other: object) -> bool: pass
def __getitem__(self, item: int) -> int: pass
def __eq__(self, other: object) -> bool: pass
class bytearray(Sequence[int]):
def __init__(self, x: bytes) -> None: pass
def __iter__(self) -> Iterator[int]: pass
def __contains__(self, other: object) -> bool: pass
def __getitem__(self, item: int) -> int: pass
def __eq__(self, other: object) -> bool: pass
class memoryview(Sequence[int]):
def __init__(self, x: bytes) -> None: pass
def __iter__(self) -> Iterator[int]: pass
def __contains__(self, other: object) -> bool: pass
def __getitem__(self, item: int) -> int: pass
def __eq__(self, other: object) -> bool: pass
class tuple(Generic[T]):
def __contains__(self, other: object) -> bool: pass
class list(Sequence[T]):
def append(self, v: T) -> None: pass
def __iter__(self) -> Iterator[T]: pass
def __contains__(self, other: object) -> bool: pass
def __getitem__(self, item: int) -> T: pass
class dict(Mapping[T, V]):
def __iter__(self) -> Iterator[T]: pass
class set(Iterable[T]):
def __iter__(self) -> Iterator[T]: pass
def __contains__(self, o: object, /) -> bool: pass
class frozenset(Iterable[T]):
def __iter__(self) -> Iterator[T]: pass
class function: pass
class ellipsis: pass
class range(Sequence[int]):
def __init__(self, __x: int, __y: int = ..., __z: int = ...) -> None: pass
def count(self, value: int) -> int: pass
def index(self, value: int) -> int: pass
def __getitem__(self, i: int) -> int: pass
def __iter__(self) -> Iterator[int]: pass
def __contains__(self, other: object) -> bool: pass
def isinstance(x: object, t: Union[type, Tuple]) -> bool: pass
class BaseException: pass