-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Switch away from sys.exit(error_msg) in dmypy #5982
Conversation
This kills a couple birds with one stone: 1. It fixes an interaction with the new run_dmypy api where that message winds up as the return code instead of in stderr. This additionally fixes a type unsoundness/mypy_mypyc crash caused by SystemExit.code being typed as int. 2. It allows us to standardize the irregular exit codes of dmypy as 2.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Looks very good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Perfect" (as they say in California).
Should we document the exit codes? |
This kills a couple birds with one stone: 1. It fixes an interaction with the new run_dmypy api where that message winds up as the return code instead of in stderr. This additionally fixes a type unsoundness/mypy_mypyc crash caused by SystemExit.code being typed as int. 2. It allows us to standardize the irregular exit codes of dmypy as 2.
Opened #6003 for this. |
This kills a couple birds with one stone:
that message winds up as the return code instead of in
stderr.
This additionally fixes a type unsoundness/mypy_mypyc crash
caused by SystemExit.code being typed as int.
as 2.