KEMBAR78
Avoid slow error message logic if errors not shown to user by JukkaL · Pull Request #14336 · python/mypy · GitHub
Skip to content

Conversation

@JukkaL
Copy link
Collaborator

@JukkaL JukkaL commented Dec 21, 2022

This helps with await-related errors introduced in #12958, in particular, which are expensive to generate. If errors are ignored (e.g. in third-party libraries) or we don't care about the error message, use simpler error message logic. We also often filter out error messages temporarily, so any effort in constructing a nice error message is wasted.

We could skip even more logic, but this should cover many of the important code paths.

This speeds up self check by about 2%.

@JukkaL JukkaL requested a review from ilevkivskyi December 21, 2022 16:54
@github-actions

This comment has been minimized.

@JukkaL
Copy link
Collaborator Author

JukkaL commented Dec 21, 2022

The mypy primer diff is unexpected, this shouldn't change output.

@github-actions
Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@JukkaL JukkaL merged commit 5349f9a into master Dec 26, 2022
@JukkaL JukkaL deleted the faster-await-check branch December 26, 2022 10:29
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.

2 participants