@@ -18,9 +18,9 @@ def astuple(obj: Any) -> Tuple[Any, ...]: ...
18
18
@overload
19
19
def astuple (obj : Any , * , tuple_factory : Callable [[List [Any ]], _T ]) -> _T : ...
20
20
@overload
21
- def dataclass (_cls : Type [_T ]) -> Type [_T ]: ...
21
+ def dataclass (__cls : Type [_T ]) -> Type [_T ]: ...
22
22
@overload
23
- def dataclass (_cls : None ) -> Callable [[Type [_T ]], Type [_T ]]: ...
23
+ def dataclass (__cls : None ) -> Callable [[Type [_T ]], Type [_T ]]: ...
24
24
@overload
25
25
def dataclass (
26
26
* , init : bool = ..., repr : bool = ..., eq : bool = ..., order : bool = ..., unsafe_hash : bool = ..., frozen : bool = ...
@@ -36,6 +36,16 @@ class Field(Generic[_T]):
36
36
init : bool
37
37
compare : bool
38
38
metadata : Mapping [str , Any ]
39
+ def __init__ (
40
+ self ,
41
+ default : _T ,
42
+ default_factory : Callable [[], _T ],
43
+ init : bool ,
44
+ repr : bool ,
45
+ hash : Optional [bool ],
46
+ compare : bool ,
47
+ metadata : Mapping [str , Any ],
48
+ ) -> None : ...
39
49
if sys .version_info >= (3 , 9 ):
40
50
def __class_getitem__ (cls , item : Any ) -> GenericAlias : ...
41
51
@@ -76,6 +86,8 @@ def is_dataclass(obj: Any) -> bool: ...
76
86
class FrozenInstanceError (AttributeError ): ...
77
87
78
88
class InitVar (Generic [_T ]):
89
+ type : Type
90
+ def __init__ (self , type : Type ) -> None : ...
79
91
if sys .version_info >= (3 , 9 ):
80
92
def __class_getitem__ (cls , type : Any ) -> GenericAlias : ...
81
93
@@ -92,4 +104,4 @@ def make_dataclass(
92
104
unsafe_hash : bool = ...,
93
105
frozen : bool = ...,
94
106
) -> type : ...
95
- def replace (obj : _T , ** changes : Any ) -> _T : ...
107
+ def replace (__obj : _T , ** changes : Any ) -> _T : ...
0 commit comments