Skip to content

MyPy Exception Type Error Message Update#15131

Merged
JukkaL merged 3 commits intopython:masterfrom
ajrpeggio:mypy_issue_5349
Apr 25, 2023
Merged

MyPy Exception Type Error Message Update#15131
JukkaL merged 3 commits intopython:masterfrom
ajrpeggio:mypy_issue_5349

Conversation

@ajrpeggio
Copy link
Copy Markdown
Contributor

Fixes #5349 - Updating Error Messaging for Invalid Exception Type

@github-actions

This comment has been minimized.

@JukkaL
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
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