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 expect mypy does not throw any error while validating the source code.
Actual Behavior
I got this output:
script/test_union.py:36: note: Revealed type is "Type[script.test_union.FooResponse]"
script/test_union.py:36: note: Revealed type is "Type[script.test_union.<subclass of "BarResponse" and "FooResponse">]"
script/test_union.py:37: error: Incompatible return value type (got "FooResponse", expected "BarResponse") [return-value]
Your Environment
Versions:
Python 3.11.1
mypy==1.2.0
mypy-extensions==1.0.0
Mypy command: mypy --strict mysourcecode.py
The text was updated successfully, but these errors were encountered:
Bug Report
Function "issubclass()" does not narrow down a type of variable.
To Reproduce
I expect mypy does not throw any error while validating the source code.
Actual Behavior
I got this output:
Your Environment
Versions:
Mypy command:
mypy --strict mysourcecode.py
The text was updated successfully, but these errors were encountered: