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
I can't tell if this is the same issue as my previous issue #9238 or not, so I'm raising it separately.
On MyPy 0.780, the code
classB:
passclassA:
B=BclassC(A.B):
pass
raises
test.py:7: error: Variable "test.A.B" is not valid as a type
test.py:7: note: See https://mypy.readthedocs.io/en/latest/common_issues.html#variables-vs-type-aliases
test.py:7: error: Invalid base class "A.B"
Found 2 errors in 1 file (checked 1 source file)
despite the equivalent code
classA:
classB:
passclassC(A.B):
pass
working fine.
The text was updated successfully, but these errors were encountered:
evhub
changed the title
Inheritance from nested class not working
Inheritance from nested class doesn't always work
Jul 31, 2020
@ilevkivskyi Is there any way to annotate the above code that would work (aside from type: ignore)? I'd like to be able to properly type-check that code.
I can't tell if this is the same issue as my previous issue #9238 or not, so I'm raising it separately.
On MyPy 0.780, the code
raises
despite the equivalent code
working fine.
The text was updated successfully, but these errors were encountered: