We use pre-commit for linting. The following checks are added: trailing white spaces, end of files, yaml, large files, black, flake8, isort, mypy and docstyle.
Install pre-commit locally with pip install pre-commit
or on MacOS brew install pre-commit
.
Run pre-commit install
to set up the git hook scripts.
Run pre-commit against git diff:
pre-commit
Run pre-commit against all files:
pre-commit run --all-files