diff --git a/.git-hooks/pre-commit b/.git-hooks/pre-commit new file mode 100755 index 0000000..9757c73 --- /dev/null +++ b/.git-hooks/pre-commit @@ -0,0 +1,7 @@ +#!/bin/bash + +echo "Running pre-commit hook" +pre-commit run -a +git diff --name-only --cached | xargs git add +echo "Re-running pre-commit hook, to check for actual (non-formatting) errors" +pre-commit run -a diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..c9b64f4 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,6 @@ +repos: +- repo: https://github.com/psf/black-pre-commit-mirror + rev: 24.10.0 + hooks: + - id: black + language_version: python3