Description
Introduce a new Type variant, basic support for class-based TypedDict syntax
Type inference for key accesses (movie['directory'] -> str)
Validation of writes to keys (synthesized __setitem__ method with key: Literal["key1"], value: ValueType1?)
Validation of constructor calls (Movie(name="Blade Runner", year=1982))
Validation of {…} literals to TypedDict types
Totality
Implement / write tests for generic TypedDicts
Implement / write tests for recursive TypedDicts
Support type inference for instance.get("known_key")?
PEP 705 support (ReadOnly)
Implement structural assignability for TypedDicts #1387
Implement disjointness for TypedDict.
Support TypedDicts in all contexts (return position, function call arguments, etc) => type context (bidirectional checking) #168
Implement .normalize() for TypeDictType.
Investigate Pydantic-specific performance problems introduced in #21467 .
Submit a correction to the upstream assignability rules => Restore a missing TypedDict subtyping requirement python/typing#2119
Support closed and extra_items for TypedDicts (PEP 728) #3096
Functional TypedDict syntax #3095
Support for Unpack Support typing.Unpack #1746
Overriding of fields in inheritance Detect invalid overrides of TypedDict items #3097
Correctness, validation
Add TypedDict to property tests.
LSP support (competitions, go to definitions, rename, hover, ...)
Performance
Reactions are currently unavailable
You can’t perform that action at this time.
Typevariant, basic support for class-basedTypedDictsyntaxTypedDictspecification from the class bodyMapping[str, object]TypedDict-based objects do not behave like instances of that class. For example, attribute access should not work._typeshed._type_checker_internals.TypedDictFallbackmovie['directory'] -> str)__setitem__method withkey: Literal["key1"], value: ValueType1?)Movie(name="Blade Runner", year=1982)){…}literals toTypedDicttypesRequiredandNotRequiredTypedDictsTypedDictsinstance.get("known_key")?ReadOnly)TypedDicts #1387TypedDict.TypedDicts in all contexts (returnposition, function call arguments, etc) => type context (bidirectional checking) #168.normalize()forTypeDictType.closedandextra_itemsfor TypedDicts (PEP 728) #3096TypedDictsyntax #3095UnpackSupporttyping.Unpack#1746TypedDicttype objects cannot be used inisinstancechecksTypedDict,TypedDict- based types andGenericTypedDict-based classes including multiple inheritanceTypedDictto property tests.TypedDicts