-
Notifications
You must be signed in to change notification settings - Fork 1.5k
add config file for pre-commit #235
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
Conversation
for more information, see https://pre-commit.ci
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.
Looks good to me! I think we agreed to add black formatting but I'll let @fpliger confirm and merge.
Would also be +1 on adding isort as suggested in #201 |
Alright they have documentation for that but I'm not sure which arguments you'd want to use https://pycqa.github.io/isort/docs/configuration/pre-commit.html |
…nto add-precommit-config
for more information, see https://pre-commit.ci
Alright that seemed to work and isort modified a number of files itself, hence the 10 new file changes. I added just the regular python hook. |
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. I'd keep the linted files out of this PR and have a follow up PR (I've done that in my related PR that I just mentioned), mostly for easy of reading... Also, the formatting I added in that PR may clash with this one..
Anyway, not a big deal. We can fix later no matter what route you choose. Thank you for this! 💯
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 love it.
I plan to add a few other ones but will do in another PR.
Simply adds a yaml that tells the Github app for pre-commit to run the Black python linting hook. Add other hooks as required.
This is separate from Github Actions - it runs as an app in the repo/org.
We also runner
prettier
for readme formatting in some repos, as a suggestion.