To install precommit, run the following in a virtualenv (and while in a git repo).
pip install pre-commit
You can confirm everything is installed by running;
To generate a new settings file locally, you need to run;
pre-commit sample-config > .pre-commit-config.yaml
Don't forget to install the hooks.
Now you're ready to run the hook.