Skip to content

Use TypeForm in __class_getitem__ for generics? #15770

@Andrew5057

Description

@Andrew5057

Now that TypeForm is in 3.15+ and typing_extensions, would it be reasonable to start using it in the __class_getitem__ stubs for generic classes? That way, we could reject constructs like list[3] without triggering false positives on things that are valid type expressions but not types.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions