Skip to content

Commit 1d82f1d

Browse files
committed
Use pre-commit-uv to speed up pre-commit hook environment installs
1 parent 4b7cf77 commit 1d82f1d

3 files changed

Lines changed: 9 additions & 2 deletions

File tree

‎docs/reference/changelog.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Unreleased changes
1616
### Developer Experience
1717

1818
- Migrate all development dependencies from `requirements/*.txt` files to PEP 735 dependency groups in `pyproject.toml` ({gh-pr}`388`)
19+
- Use `pre-commit-uv` to speed up pre-commit hook environment installs ({gh-pr}`396`)
1920

2021
### CI/CD
2122

‎pyproject.toml‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,10 @@ local-dev = [
134134
"setuptools-scm>=8",
135135
# Tox
136136
"tox",
137-
# pre-commit
137+
# pre-commit (the pre-commit-uv plugin makes pre-commit
138+
# build its hook environments with uv - faster installs)
138139
"pre-commit",
140+
"pre-commit-uv",
139141
# Releases are still a manual process that
140142
# requires the use of bumpversion locally
141143
"bumpversion",

‎tox.ini‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,11 @@ passenv =
7373
XDG_CACHE_HOME
7474
SSH_AUTH_SOCK
7575
skip_install = true
76-
deps = pre-commit
76+
deps =
77+
pre-commit
78+
# Plugin that makes pre-commit build its hook
79+
# environments with uv (faster installs)
80+
pre-commit-uv
7781
commands =
7882
all: pre-commit run --all-files --show-diff-on-failure {posargs:}
7983
quick: pre-commit run ruff-format --all-files

0 commit comments

Comments
 (0)