dataclasses: fix and sort stubtest complaints (#7888)

This commit is contained in:
Jelle Zijlstra
2022-05-19 19:13:22 -07:00
committed by GitHub
parent 4220712aab
commit 0b7df3b2aa
6 changed files with 37 additions and 9 deletions

View File

@@ -240,7 +240,26 @@ class InitVar(Generic[_T]):
@overload
def __class_getitem__(cls, type: Any) -> InitVar[Any]: ...
if sys.version_info >= (3, 10):
if sys.version_info >= (3, 11):
def make_dataclass(
cls_name: str,
fields: Iterable[str | tuple[str, type] | tuple[str, type, Any]],
*,
bases: tuple[type, ...] = ...,
namespace: dict[str, Any] | None = ...,
init: bool = ...,
repr: bool = ...,
eq: bool = ...,
order: bool = ...,
unsafe_hash: bool = ...,
frozen: bool = ...,
match_args: bool = ...,
kw_only: bool = ...,
slots: bool = ...,
weakref_slot: bool = ...,
) -> type: ...
elif sys.version_info >= (3, 10):
def make_dataclass(
cls_name: str,
fields: Iterable[str | tuple[str, type] | tuple[str, type, Any]],