mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-29 07:06:55 +08:00
Fix missing type for dataclasses (#3708)
* Add missing return type to make_dataclass * Fix consistency check
This commit is contained in:
@@ -66,6 +66,6 @@ class InitVar(Generic[_T]): ...
|
||||
def make_dataclass(cls_name: str, fields: Iterable[Union[str, Tuple[str, type], Tuple[str, type, Field[Any]]]], *,
|
||||
bases: Tuple[type, ...] = ..., namespace: Optional[Dict[str, Any]] = ...,
|
||||
init: bool = ..., repr: bool = ..., eq: bool = ..., order: bool = ..., hash: bool = ...,
|
||||
frozen: bool = ...): ...
|
||||
frozen: bool = ...) -> type: ...
|
||||
|
||||
def replace(obj: _T, **changes: Any) -> _T: ...
|
||||
|
||||
2
third_party/3/dataclasses.pyi
vendored
2
third_party/3/dataclasses.pyi
vendored
@@ -66,6 +66,6 @@ class InitVar(Generic[_T]): ...
|
||||
def make_dataclass(cls_name: str, fields: Iterable[Union[str, Tuple[str, type], Tuple[str, type, Field[Any]]]], *,
|
||||
bases: Tuple[type, ...] = ..., namespace: Optional[Dict[str, Any]] = ...,
|
||||
init: bool = ..., repr: bool = ..., eq: bool = ..., order: bool = ..., hash: bool = ...,
|
||||
frozen: bool = ...): ...
|
||||
frozen: bool = ...) -> type: ...
|
||||
|
||||
def replace(obj: _T, **changes: Any) -> _T: ...
|
||||
|
||||
Reference in New Issue
Block a user