mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
Redefined dataclasses.KW_ONLY (#5826)
Redefined dataclasses.KW_ONLY so it's a type alias rather than a class instance. Class instances are illegal to use within a type annotation.
This commit is contained in:
@@ -13,8 +13,7 @@ class _MISSING_TYPE: ...
|
||||
MISSING: _MISSING_TYPE
|
||||
|
||||
if sys.version_info >= (3, 10):
|
||||
class _KW_ONLY_TYPE: ...
|
||||
KW_ONLY: _KW_ONLY_TYPE
|
||||
class KW_ONLY: ...
|
||||
|
||||
@overload
|
||||
def asdict(obj: Any) -> Dict[str, Any]: ...
|
||||
|
||||
Reference in New Issue
Block a user