Skip to content

Get rid of fake TypeInfo's for TypedDicts #8620

Open
@ilevkivskyi

Description

@ilevkivskyi

We currently create fake TypeInfos to store TypedDicts. 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 fake TypeInfo.

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 new SymbolNode subclass (or reuse TypeAlias, so a TypedDict definition A = TypedDict('A' {'x': int, 'y': int}) will be very similar to A = Dict[str, int]).

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions