Improve accuracy of dataclasses.Field (#12082)

This commit is contained in:
Max Muoto
2024-06-24 04:25:50 -05:00
committed by GitHub
parent de22c30fa8
commit 6b2033a783

View File

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