mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
Improve accuracy of dataclasses.Field (#12082)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user