-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Open
Labels
Description
Bug Report
I expect to not need to annotate the example below
To Reproduce
class C[T: (int, str)]:
def __init__(self, x: T) -> None:
self.x = x
Expected Behavior
no errors
Actual Behavior
$ ./venv/bin/mypy t.py
t.py:3: error: Need type annotation for "x" [var-annotated]
Your Environment
- Mypy version used: 1.17.1
- Mypy command-line flags: n/a
- Mypy configuration options from
mypy.ini
(and other config files): n/a - Python version used: 3.13.1