-
-
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
MyPy Exception Type Error Message Update #15131
Conversation
This comment has been minimized.
This comment has been minimized.
Thanks for the PR! Can you update the failing tests to use the new error message? |
Absolutely! I just updated the test cases :) |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great, thank you!
One possible nit: maybe "or be a tuple of exception classes"? I think the additional "be" makes it clearer in the presence of "derived"
That's an easy adjustment. I'll do that now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again! :-)
Diff from mypy_primer, showing the effect of this PR on open source code: packaging (https://github.com/pypa/packaging) got 30.10 faster (3.7s -> 0.1s)
vision (https://github.com/pytorch/vision) got 1.20 slower (28.4s -> 34.0s)
|
(We're experimenting with reporting CI time differences, the performance numbers here are just noise) |
Fixes #5349 - Updating Error Messaging for Invalid Exception Type