From 6b2033a783ad4f963979c761f32b14d1d9374bc5 Mon Sep 17 00:00:00 2001 From: Max Muoto Date: Mon, 24 Jun 2024 04:25:50 -0500 Subject: [PATCH] Improve accuracy of `dataclasses.Field` (#12082) --- stdlib/dataclasses.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/dataclasses.pyi b/stdlib/dataclasses.pyi index 30489e6f8b3d..626608e8a59d 100644 --- a/stdlib/dataclasses.pyi +++ b/stdlib/dataclasses.pyi @@ -108,7 +108,7 @@ class _DefaultFactory(Protocol[_T_co]): class Field(Generic[_T]): name: str - type: Type[_T] + type: Type[_T] | str | Any default: _T | Literal[_MISSING_TYPE.MISSING] default_factory: _DefaultFactory[_T] | Literal[_MISSING_TYPE.MISSING] repr: bool