We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
or
Optional[x]
When using --strict-optional, the type of a is incorrectly Union[None, str]:
--strict-optional
a
Union[None, str]
from typing import Optional def f(x: Optional[str]) -> None: a = x or 'default' reveal_type(a) # should be str
#1698 seems related.
The text was updated successfully, but these errors were encountered:
Use information from find_isinstance_check in short-circuit case too
5e8f392
Fixes python#1733.
Optional[T] or T
T
Optional[T]
For Optional[T] or T, infer the type T instead of Optional[T].
690c4d5
Fixes #1817, fixes #1733.
Use information from find_isinstance_check typing boolean operators (#…
4c11bb3
…1828) Fixes #1817, fixes #1733.
Successfully merging a pull request may close this issue.
When using
--strict-optional
, the type ofa
is incorrectlyUnion[None, str]
:#1698 seems related.
The text was updated successfully, but these errors were encountered: