Use this repo as a starting point for new repositories, if it suits you.
When using with your own repo you'll need to install pre-commit and then initialize it in the repo.
Installation can be done with pip:
pip install pre-commit
And init:
pre-commit install