How to setup pre-commit hooks
- Take all the files from this gist and add them to the root of your project.
- Make the following changes:
- Change in
pyproject.toml
on lines 20 and 23{{ service_name }}
to your main module - Add to your project
pre-commit
viapip install pre-commit
- Run
pre-commit install
Now you can use pre-commit hooks
Pre-commit hooks help with creation of code with cosistent style between developers. They run before every commit. But they could be run manually:
$ git add .
$ pre-commit run --all-files