feat(tooling): Enabled local linting#1315
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.