Skip to content

Commit 67cc817

Browse files
authored
build: 🔨 add a "install pre-commit" justfile recipe (#77)
## Description So that anyone who contributes will trigger pre-commit hooks right away. <!-- Select quick/in-depth as necessary --> This PR needs a quick review.
1 parent 3e09f3e commit 67cc817

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

justfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@
44
# Run all build-related recipes in the justfile
55
run-all: install-deps format-python check-python check-unused test-python check-security check-spelling check-commits build-website
66

7+
# Install the pre-commit hooks
8+
install-precommit:
9+
# Install pre-commit hooks
10+
uvx pre-commit install
11+
# Run pre-commit hooks on all files
12+
uvx pre-commit run --all-files
13+
# Update versions of pre-commit hooks
14+
uvx pre-commit autoupdate
15+
716
# Install Python package dependencies
817
install-deps:
918
uv sync --all-extras --dev
@@ -74,4 +83,5 @@ check-unused:
7483
# - 90 %: import
7584
# - 60 %: attribute, class, function, method, property, variable
7685
# There are some things should be ignored though, with the allowlist.
86+
# Create an allowlist with `vulture --make-allowlist`
7787
uv run vulture src/ tests/ **/vulture-allowlist.py

0 commit comments

Comments
 (0)