Debian Codegraph @

test-data/unit/fixtures/isinstance_python3_10.pyi

raw
1 # For Python 3.10+ only
2 from typing import Tuple, TypeVar, Generic, Union, cast, Any, Type
3 import types
4
5 T = TypeVar('T')
6
7 class object:
8 def __init__(self) -> None: pass
9
10 class type:
11 def __init__(self, x) -> None: pass
12 def __or__(self, x) -> types.UnionType: pass
13
14 class tuple(Generic[T]): pass
15
16 class function: pass
17
18 def isinstance(x: object, t: Union[Type[object], Tuple[Type[object], ...], types.UnionType]) -> bool: pass
19 def issubclass(x: object, t: Union[Type[object], Tuple[Type[object], ...]]) -> bool: pass
20
21 class int:
22 def __add__(self, other: 'int') -> 'int': pass
23 class float: pass
24 class bool(int): pass
25 class str:
26 def __add__(self, other: 'str') -> 'str': pass
27 class ellipsis: pass
28
29 NotImplemented = cast(Any, None)
30
31 class dict: pass