mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 21:14:48 +08:00
dataclasses.make_dataclass has a new parameter in 3.12 (#10006)
Source 810d365b5e/Lib/dataclasses.py (L1403)
This commit is contained in:
@@ -247,7 +247,27 @@ class InitVar(Generic[_T], metaclass=_InitVarMeta):
|
||||
@overload
|
||||
def __class_getitem__(cls, type: Any) -> InitVar[Any]: ...
|
||||
|
||||
if sys.version_info >= (3, 11):
|
||||
if sys.version_info >= (3, 12):
|
||||
def make_dataclass(
|
||||
cls_name: str,
|
||||
fields: Iterable[str | tuple[str, type] | tuple[str, type, Any]],
|
||||
*,
|
||||
bases: tuple[type, ...] = (),
|
||||
namespace: dict[str, Any] | None = None,
|
||||
init: bool = True,
|
||||
repr: bool = True,
|
||||
eq: bool = True,
|
||||
order: bool = False,
|
||||
unsafe_hash: bool = False,
|
||||
frozen: bool = False,
|
||||
match_args: bool = True,
|
||||
kw_only: bool = False,
|
||||
slots: bool = False,
|
||||
weakref_slot: bool = False,
|
||||
module: str | None = None,
|
||||
) -> type: ...
|
||||
|
||||
elif sys.version_info >= (3, 11):
|
||||
def make_dataclass(
|
||||
cls_name: str,
|
||||
fields: Iterable[str | tuple[str, type] | tuple[str, type, Any]],
|
||||
|
||||
Reference in New Issue
Block a user