pre-commit (https://pre-commit.com/) is a tool that helps you easily manage pre-commit hooks. We are using this largely for quality control by running tools like flake8 and black.