Fix missing type for dataclasses (#3708)

* Add missing return type to make_dataclass

* Fix consistency check
This commit is contained in:
Rune Tynan
2020-02-03 00:58:15 -05:00
committed by GitHub
parent 2c2c60bfc8
commit e3ddfd46b4
2 changed files with 2 additions and 2 deletions

View File

@@ -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: ...

View File

@@ -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: ...