Skip to content

tkinter.Event is typed as generic but implementation isn't subscriptable #12591

@yowoda

Description

@yowoda

Implementation can be found here: https://github.com/python/cpython/blob/aa905925e1a0120e59e4ffe0874fbd098bf47e63/Lib/tkinter/__init__.py#L217

The stub:

class Event(Generic[_W_co]):

Not sure if this is intended behaviour (I assume it isn't) but right now type checkers can only be satisfied if doing
from __future__ import annotations or putting tk.Event[...] in quotes

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