-
Notifications
You must be signed in to change notification settings - Fork 1
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
fix: github action lint #24
base: main
Are you sure you want to change the base?
Conversation
Lots and lots of linting fixes.
@@ -0,0 +1,42 @@ | |||
repos: |
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.
This project uses [pre-commit](https://pre-commit.com/). | ||
|
||
```bash | ||
python3 -m pip install -U pre-commit |
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.
@pvetere FYI you'll want to run through these steps on your local machine
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.
I don't see any issues here. Looks mostly like cleanup from adding the pre-commit checks.
src/error_handler.py
Outdated
def abort(s): | ||
eprint(s) | ||
os._exit(1) | ||
sys.exit(1) |
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.
Hmm. I actually was using os._exit
here intentionally to avoid having the exception bubbling out. The sys.exit
call apparently causes a SystemExit exception to bubble up to the higher level handlers. In some cases, thought, I just want the program to immediately exit.
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.
I think we might want to look into this a bit more for a less heavy-handed way of accomplishing the same thing. os._exit()
is a sledgehammer.
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.
I'm going to punt on this for this change and revert back to os._exit().
I gotta say I'm still shocked by the number of foot guns in this language.
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.
That sounds like a good plan. I'll take the responsibility to go back and fix it later.
Lots and lots of linting fixes.