Debian Codegraph @

test-data/unit/fixtures/literal__new__.pyi

raw
1 from typing import Literal, Protocol, overload
2
3 class object:
4 def __init__(self) -> None: pass
5
6 class type:
7 def __init__(self, x) -> None: pass
8
9 class str: pass
10 class dict: pass
11 class float: pass
12 class int:
13 def __new__(cls) -> Literal[0]: pass
14
15 class _Truthy(Protocol):
16 def __bool__(self) -> Literal[True]: pass
17
18 class _Falsy(Protocol):
19 def __bool__(self) -> Literal[False]: pass
20
21 class bool(int):
22 @overload
23 def __new__(cls, __o: _Truthy) -> Literal[True]: pass
24 @overload
25 def __new__(cls, __o: _Falsy) -> Literal[False]: pass