Using pre-commit
Installing pre-commit:
pip install pre-commit
Initialising pre-commit (needs to be run within a directory containing a .git folder):
pre-commit install
Running pre-commit hooks on a specific file:
pre-commit run --files Hospitals\pt_hospitals_dataitemparameters.py
Running pre-commit hooks on all files:
pre-commit run --all-files
This post is licensed under CC BY 4.0 by the author.