Skip to content

Binder doesn't work well with Type[...] #4616

Description

@ilevkivskyi

This code:

fromtypingimportUnion, TypeclassC: ...
x: Union[C, Type[C]]
ifisinstance(x, type) andissubclass(x, C):
reveal_type(x)

Shows that the type of x is builtins.type. Ideally it should be Type[C].

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions