-
Notifications
You must be signed in to change notification settings - Fork 548
feat(tooling): Enabled local linting #1315
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
I added "pre-commit" to the test-requirements.txt, did not know where to put it. |
@antonpirker I'm not familiar with this tool, but why do we need this over just a normal git hook? |
pre-commit has a collection of ready made hooks to choose from and it is very easy to install/uninstall the hooks. So it is just for convenience and I think it is used in python projects quite frequently (at least in the project i was part of) :-) |
Excellent addition! |
@miketheman we already had an autofix step here but we removed it since it was flaky on external contributors' forked PRs. Not sure if |
I believe it does, as I use it on some of my open source projects, and it is run when people submit pull requests from their forks. |
This also makes the pre-commit.yaml the source of rule evaluation, vs having to maintain them in two spots - the pre-commit files and the tox config for GH Action. |
ok thanks! will try it out and clean this process up a bit more. |
To speed up development and prevent a lot of front and back with the CI linter, I added a pre-commit hook, so before one can commit something the linting (black, flake8 and mypy) will run locally to format and lint the changed files.