-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Use a different error code on early exit #2754
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
Comments
Good idea. Then it should also exit 2 if it can't open a file and for other "early stage" errors. (It already uses exit 2 for command line parsing errors.) |
Maybe there should be 3 error exit codes?
|
Maybe, but the problem is that there's no standard for codes other than 0,
1, 2. So perhaps this not such a good idea after all? What's the use case
for distinguishing blockers?
|
Whoops, I searched for exit status but didn't find this issue. Sorry! Maybe it's time to increase priority? |
If you think there's a current need for this, sure! |
Mostly that I wish to remove certain code from an internal mypy integration script (you know the one). |
Let's implement the following:
|
Also, note that parse errors are implicitly treated as blocking errors. |
Exit with code 2 on blocking errors, while continuing to exit with 1 when there are nonblocking errors. Add test infrastructure. Fixes #2754.
Exit with code 2 on blocking errors, while continuing to exit with 1 when there are nonblocking errors. Add test infrastructure. Fixes #2754.
Exit with code 2 on blocking errors, while continuing to exit with 1 when there are nonblocking errors. Add test infrastructure. Fixes #2754.
Exit with code 2 on blocking errors, while continuing to exit with 1 when there are nonblocking errors. Add test infrastructure. Fixes #2754.
When running mypy from a script, it's sometimes nice to know when mypy successfully completed a full typechecking run vs exited early due to blocking errors. Perhaps mypy could exit with exit code
2
when exiting due to blocking errors?The text was updated successfully, but these errors were encountered: