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

Switch away from sys.exit(error_msg) in dmypy #5982

Merged
merged 1 commit into from
Nov 30, 2018
Merged

Switch away from sys.exit(error_msg) in dmypy #5982

merged 1 commit into from
Nov 30, 2018

Conversation

msullivan
Copy link
Collaborator

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.

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.
Copy link
Member

@ilevkivskyi ilevkivskyi left a 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!

Copy link
Collaborator

@ethanhs ethanhs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Member

@gvanrossum gvanrossum left a 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).

@JukkaL
Copy link
Collaborator

JukkaL commented Dec 3, 2018

Should we document the exit codes?

JukkaL pushed a commit that referenced this pull request Dec 3, 2018
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.
@ilevkivskyi
Copy link
Member

Should we document the exit codes?

Opened #6003 for this.

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.

5 participants