-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
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
Type inference regression with "and" and strict optional disabled #11705
Labels
Comments
JukkaL
added
bug
mypy got something wrong
false-positive
mypy gave an error on correct code
labels
Dec 10, 2021
The problem is that I will try to solve it. |
Let's test it: #11717 |
JukkaL
pushed a commit
that referenced
this issue
Jan 6, 2022
JukkaL
pushed a commit
that referenced
this issue
Jan 7, 2022
tushar-deepsource
pushed a commit
to DeepSourceCorp/mypy
that referenced
this issue
Jan 20, 2022
…ython#11709) In some places in our code bool was compared with `Union[Literal[True], Literal[False]]`. It was later compared with each union item. And bool is not subtype of `Literal[True]` and `Literal[False]`. Closes python#11701 Refs python#11705
tushar-deepsource
pushed a commit
to DeepSourceCorp/mypy
that referenced
this issue
Jan 20, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
This generates a false positive:
It started happening as a side effect of #10389.
This is a regression, so this may be high priority. However, since this only seems to happen when strict optional checking is disabled, the impact may be pretty minor.
cc @ethan-leba
The text was updated successfully, but these errors were encountered: