-
Notifications
You must be signed in to change notification settings - Fork 175
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
Add pre-commit configuration to apply Black formatting #418
Conversation
3dd2458
to
3e6f23e
Compare
a43a878
to
cf97cf3
Compare
.github/workflows/autoformat.yml
Outdated
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 had originally named this code-checks.yml
because I thought we might have other checks (linting, static type checking) in the future. But maybe it's a good idea to separate workflows that make direct changes to the branch vs workflows that just check it.
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.
Black formatting was the only job in the workflow, so I felt the name was misleading once it was updated to autocommit. If we want to keep code formatting/style/static analysis stuff in this file I can change the name back.
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.
Retained the original Code Checks naming as this now uses pre-commit and PR checks rather than autocommits.
3e47571
to
0f10f90
Compare
@andrewfrench based on the number of files changed I assume you also changed the line length to 120? If so, let's update the description to reflect that. |
0f10f90
to
6b1ec84
Compare
3055336
to
c4ea1c8
Compare
eb419e9
Adds local pre-commit configuration to enforce Black formatting. If code is not formatted appropriately, the Code Checks workflow will fail. The README has been updated with info on formatting expectations and how to configure
pre-commit
, which has been added as a dependency usingpoetry
.Configure
pre-commit
usingpoetry
:Closes #426