-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
False positive with Python 2 old-style raise statement #11742
Labels
Comments
JukkaL
added
bug
mypy got something wrong
false-positive
mypy gave an error on correct code
labels
Dec 14, 2021
JukkaL
added a commit
that referenced
this issue
Dec 14, 2021
tushar-deepsource
pushed a commit
to DeepSourceCorp/mypy
that referenced
this issue
Jan 20, 2022
python#11289)" (python#11743) This reverts commit c22beb4. See python#11742 for context.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This generates an error, even though it's valid at runtime:
An exception instance is valid if the second object is
None
: https://docs.python.org/2/reference/simple_stmts.html#the-raise-statementIt looks like #11289 forgot to handle this case.
Since this is a regression and we are close to cutting a release branch, I'm planning to revert #11289 for now. It can be merged again with a fix to the special case.
cc @sobolevn
The text was updated successfully, but these errors were encountered: