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
>>>file.py:6: error: Variable "cls" is not valid as a type [valid-type]
>>>file.py:6: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
>>>file.py:6: error: Invalid base class "cls" [misc]
Your Environment
Mypy version used:`0.990
Python version used: 3.9.10
The text was updated successfully, but these errors were encountered:
I believe that's fixed by #14135 which has been merged to master but hasn't been released yet.
(I haven't tried it out though.)
Correct, this is already fixed on master. I can reproduce with c660354, but not with 3c5f368. The fix will be released as part of mypy 1.0, coming soon!
Bug Report
It seems that mypy does not allow to inherit from a parameter when creating a function on the fly.
To Reproduce
Expected Behavior
Mypy should not complain
Actual Behavior
Mypy complain and say
Your Environment
The text was updated successfully, but these errors were encountered: