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

Improve crash handling in type-ratchet script #33

Merged
merged 1 commit into from
May 9, 2024
Merged

Improve crash handling in type-ratchet script #33

merged 1 commit into from
May 9, 2024

Conversation

meshy
Copy link
Contributor

@meshy meshy commented May 9, 2024

Before this change, we were failing to catch crashes from mypy plugins, which can cause mypy to crash with a return-code of 1.

Frustratingly, return-code 1 is what mypy returns when it finds type errors.

This change tries to work out if mypy failed in an expected manner by reading the last line of mypy's output and checking to see if it matches the standard error format: "Found X errors ...".

Before this change, we were failing to catch crashes from mypy plugins,
which can cause mypy to crash with a return-code of 1.

Frustratingly, return-code 1 is what mypy returns when it finds type
errors.

This change tries to work out if mypy failed in an expected manner by
reading the last line of mypy's output and checking to see if it matches
the standard error format: "Found X errors ...".
@meshy meshy requested a review from a team May 9, 2024 16:28
@meshy meshy merged commit d0ebee4 into main May 9, 2024
9 checks passed
@meshy meshy deleted the fix-typing branch May 9, 2024 16:31
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