Get rid of fake TypeInfo's for TypedDicts #8620
Labels
bug
mypy got something wrong
priority-1-normal
refactoring
Changing mypy's internals
topic-typed-dict
We currently create fake
TypeInfo
s to storeTypedDict
s. This used to cause various issues, in particular, currently the type of a TypedDict "class object" in runtime context is() -> SomeTypedDict
, where the return type is an instance of the fakeTypeInfo
.We can probably fix latter by just constructing a reasonable type, but a more global solution would be to get rid of the fake
TypeInfo
entirely. It is not needed for anything and just complicates things. We will need to put some symbol node in the symbol table, so we would need a newSymbolNode
subclass (or reuseTypeAlias
, so a TypedDict definitionA = TypedDict('A' {'x': int, 'y': int})
will be very similar toA = Dict[str, int]
).The text was updated successfully, but these errors were encountered: