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 would expect that isinstance(a, str | None) would narrow the variable a to str | None.
Actual Behavior
The type of a is not narrowed to str | None and remains of type str | int | None.
main.py:16: error: Incompatible return value type (got "str | int | None", expected "int") [return-value]
Found 1 error in 1 file (checked 1 source file)
Your Environment
Mypy version used: 1.10.1
Mypy command-line flags: None
Mypy configuration options from mypy.ini (and other config files): None