Skip to content
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

Merged
merged 3 commits into from Apr 25, 2023

Conversation

ajrpeggio
Copy link
Contributor

Fixes #5349 - Updating Error Messaging for Invalid Exception Type

@github-actions

This comment has been minimized.

@JukkaL
Copy link
Collaborator

JukkaL commented Apr 25, 2023

Thanks for the PR! Can you update the failing tests to use the new error message?

@ajrpeggio
Copy link
Contributor Author

Thanks for the PR! Can you update the failing tests to use the new error message?

Absolutely! I just updated the test cases :)

@github-actions

This comment has been minimized.

Copy link
Collaborator

@hauntsaninja hauntsaninja left a 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"

@ajrpeggio
Copy link
Contributor Author

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.

Copy link
Collaborator

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again! :-)

@github-actions
Copy link
Contributor

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)

@hauntsaninja
Copy link
Collaborator

(We're experimenting with reporting CI time differences, the performance numbers here are just noise)

@JukkaL JukkaL merged commit e4217f2 into python:master Apr 25, 2023
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

except handler type error should admit the possibility of tuples
3 participants