forked from python/mypy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpython2.pyi
More file actions
36 lines (29 loc) · 1012 Bytes
/
python2.pyi
File metadata and controls
36 lines (29 loc) · 1012 Bytes
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
from typing import Generic, Iterable, TypeVar, Sequence, Iterator
class object:
def __init__(self) -> None: pass
def __eq__(self, other: object) -> bool: pass
def __ne__(self, other: object) -> bool: pass
class type:
def __init__(self, x) -> None: pass
class function: pass
class int: pass
class float: pass
class str:
def format(self, *args, **kwars) -> str: ...
class unicode:
def format(self, *args, **kwars) -> unicode: ...
class bool(int): pass
T = TypeVar('T')
S = TypeVar('S')
class list(Iterable[T], Generic[T]):
def __iter__(self) -> Iterator[T]: pass
def __getitem__(self, item: int) -> T: pass
class tuple(Iterable[T]):
def __iter__(self) -> Iterator[T]: pass
class dict(Generic[T, S]): pass
class bytearray(Sequence[int]):
def __init__(self, string: str) -> None: pass
def __contains__(self, item: object) -> bool: pass
def __iter__(self) -> Iterator[int]: pass
def __getitem__(self, item: int) -> int: pass
# Definition of None is implicit