-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Change sys.exit to Raise. #2440
Conversation
fb60095
to
8a641b1
Compare
8a641b1
to
3b151f4
Compare
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.
Ah yeah this makes sense. Thanks for the PR!
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, just one minor comment
Not waiting for all of primer since the chance of them uncovering an issue here is extremely low. |
Hey thanks for your contribution! This project is only possible by contributions like these 🖤. You're awesome, @erykoff, never really thought about how a sys.exit would be problematic on import (not sure why, but eh who cares :p). If you have any suggestions about your contributing experience here, please let us via #2238, thank you once again! |
The fix for #1688 in #1761 breaks
help("modules")
introspection and also leads to unhappy results when inadvertently importingblackd
from python. E.g.:(Notice that python has been exited).
This PR changes the
sys.exit(-1)
in theimport
code to a properRaise
.