| 1 |
# Builtins stub used in check-narrowing test cases. |
| 2 |
from typing import Generic, Sequence, Tuple, Type, TypeVar, Union, Iterable |
| 3 |
|
| 4 |
|
| 5 |
Tco = TypeVar('Tco', covariant=True) |
| 6 |
KT = TypeVar("KT") |
| 7 |
VT = TypeVar("VT") |
| 8 |
|
| 9 |
class object: |
| 10 |
def __init__(self) -> None: pass |
| 11 |
|
| 12 |
class type: pass |
| 13 |
class tuple(Sequence[Tco], Generic[Tco]): pass |
| 14 |
class function: pass |
| 15 |
class ellipsis: pass |
| 16 |
class int: pass |
| 17 |
class str: pass |
| 18 |
class float: pass |
| 19 |
class dict(Generic[KT, VT]): pass |
| 20 |
|
| 21 |
def isinstance(x: object, t: Union[Type[object], Tuple[Type[object], ...]]) -> bool: pass |
| 22 |
|
| 23 |
class list(Sequence[Tco]): |
| 24 |
def __contains__(self, other: object) -> bool: pass |
| 25 |
class set(Iterable[Tco], Generic[Tco]): |
| 26 |
def __init__(self, iterable: Iterable[Tco] = ...) -> None: ... |
| 27 |
def __contains__(self, item: object) -> bool: pass |