mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-25 04:16:44 +08:00
Fix NamedTuple._field_types for python > 3.9 (#6728)
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com> Co-authored-by: Akuli <akuviljanen17@gmail.com>
This commit is contained in:
@@ -682,7 +682,10 @@ def cast(typ: object, val: Any) -> Any: ...
|
||||
# Type constructors
|
||||
|
||||
class NamedTuple(Tuple[Any, ...]):
|
||||
_field_types: collections.OrderedDict[str, Type[Any]]
|
||||
if sys.version_info < (3, 8):
|
||||
_field_types: collections.OrderedDict[str, type]
|
||||
elif sys.version_info < (3, 9):
|
||||
_field_types: dict[str, type]
|
||||
_field_defaults: dict[str, Any]
|
||||
_fields: Tuple[str, ...]
|
||||
_source: str
|
||||
|
||||
Reference in New Issue
Block a user