Usage:
pip install pre-commit
- Copy and paste the file. Note, it will only pick up on yaml, not yml.
- Install the pre-commit by doing
pre-commit install
- Test run:
pre-commit run --all-files
- Actual usage is when you commit. If errored, then re-add files:
git add .
I'm using isort v4.3.21 because it does proper linting like flake8 in that, if you were to have some long import line, then the parenthesis would wrap the imports vertically. v5 isort just wraps the imports until it hits the line length max again (unless I'm missing a configuration).