You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
False positive error "incompatible type" calling super() on a generic class with TypeVar constraints #14774
main.py: note: In member "__init__" of class "B":
main.py:13:26: error: Argument 1 to "__init__" of "C" has incompatible type "float"; expected "T" [arg-type]
main.py:13:26: error: Argument 1 to "__init__" of "C" has incompatible type "int"; expected "T" [arg-type]
Found 2 errors in 1 file (checked 1 source file)
I'm running into the same issue. I've also noticed that, if the types in the constraint are related, then using a bound instead of constraint fixes the issue.
Activity
Add a workaround for a mypy issue
Add a workaround for a mypy issue
Add a workaround for a mypy issue
Add a workaround for a mypy issue
Add a workaround for a mypy issue
Add a workaround for a mypy issue
Add a workaround for a mypy issue
Add a workaround for a mypy issue
Add a workaround for a mypy issue
Add a workaround for a mypy issue
bjoernpollex-sc commentedon Apr 13, 2026
I'm running into the same issue. I've also noticed that, if the types in the constraint are related, then using a bound instead of constraint fixes the issue.