A collection of pre-commit hooks for better Python programming.
To use the utilities in this repository, follow these steps:
- Change directory to your repository root
- Create a submodule in the target repository:
git submodule add https://github.com/zerafachris/pre-commit-hooks pre-commit-hooks
- Create a new conda environment called pre-commit and install the pre-commit hooks called
pre-commit
If the submodule has already been initialised on your package, use git submodule update --init --recursive
instead
Run the pre-commit hooks manually by running the following command:
- Activate the pre-commit environment
mamba activate pre-commit
- Run the pre-commit via
pre-commit run --all-files --config pre-commit-hooks/.pre-commit-config.yaml
See a collection of all supported pre-commit hooks.
For more information on pre-commit and how to leverage it for improving your Python development workflow, visit the pre-commit documentation Further reading on pre-commit.