shapelib provides pre-commit hooks to run code linters before a commit is made. The hooks are cloned with the repository and can be installed using pre-commit:
python -m pip install pre-commit
pre-commit install
Once installed, the hooks can be run manually via pre-commit run --all-files
.
Due to whole-tree code reformatting, git blame
information might be
misleading. To avoid that, you need to modify your git configuration as following
to ignore the revision of the whole-tree reformatting:
git config blame.ignoreRevsFile .git-blame-ignore-revs