| 1 |
# builtins stub used in type-related test cases. |
| 2 |
|
| 3 |
from typing import Any, Generic, TypeVar, List, Union |
| 4 |
import types |
| 5 |
|
| 6 |
T = TypeVar("T") |
| 7 |
S = TypeVar("S") |
| 8 |
|
| 9 |
class object: |
| 10 |
def __init__(self) -> None: pass |
| 11 |
def __str__(self) -> 'str': pass |
| 12 |
def __eq__(self, value: object, /) -> bool: ... |
| 13 |
|
| 14 |
class list(Generic[T]): pass |
| 15 |
|
| 16 |
class type: |
| 17 |
__name__: str |
| 18 |
def __call__(self, *args: Any, **kwargs: Any) -> Any: pass |
| 19 |
def __or__(self, other: Union[type, None]) -> type: pass |
| 20 |
def __ror__(self, other: Union[type, None]) -> type: pass |
| 21 |
def mro(self) -> List['type']: pass |
| 22 |
|
| 23 |
class tuple(Generic[T]): pass |
| 24 |
class dict(Generic[T, S]): pass |
| 25 |
class function: pass |
| 26 |
class bool: pass |
| 27 |
class int: pass |
| 28 |
class str: pass |
| 29 |
class ellipsis: pass |
| 30 |
class float: pass |
| 31 |
|
| 32 |
def isinstance(obj: object, class_or_tuple: type | types.UnionType, /) -> bool: ... |