We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5b5e996 commit 77002a9Copy full SHA for 77002a9
1 file changed
.githooks/pre-commit
@@ -0,0 +1,17 @@
1
+#!/bin/sh
2
+# Run Black and isort before each commit to keep formatting consistent.
3
+
4
+set -euo pipefail
5
6
+echo "[pre-commit] Running isort..."
7
+poetry run isort pandasaurus test
8
9
+echo "[pre-commit] Running black..."
10
+poetry run black pandasaurus test
11
12
+if ! git diff --quiet --exit-code; then
13
+ echo "[pre-commit] Formatting changes were applied. Please review and stage them."
14
+ exit 1
15
+fi
16
17
+echo "[pre-commit] Formatting OK."
0 commit comments