Skip to content

Commit 0a95416

Browse files
committed
Add uv to pre-commit
Signed-off-by: Samuel Monson <smonson@redhat.com>
1 parent 0ccc211 commit 0a95416

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

.pre-commit-config.yaml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,19 @@ repos:
66
exclude: ^tests/?.*/assets/.+
77
- id: end-of-file-fixer
88
exclude: ^tests/?.*/assets/.+
9-
- repo: https://github.com/pdm-project/pdm
10-
rev: 2.25.6
9+
- repo: https://github.com/astral-sh/uv-pre-commit
10+
rev: 0.9.15
1111
hooks:
12-
- id: pdm-lock-check
13-
name: check lock file matches pyproject
14-
entry: sh -c "pdm lock -v --check || pdm lock --update-reuse"
12+
- id: uv-lock
13+
name: check uv.lock file matches pyproject
14+
- id: uv-export
15+
args:
16+
- "--frozen"
17+
- "--all-groups"
18+
- "--all-extras"
19+
- "--format=pylock.toml"
20+
- "--output-file=pylock.toml"
21+
- "--quiet"
1522
- repo: https://github.com/astral-sh/ruff-pre-commit
1623
rev: v0.11.7
1724
hooks:

pylock.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# This file was autogenerated by uv via the following command:
2-
# uv export --all-groups --all-extras --locked --format pylock.toml
2+
# uv export --frozen --all-groups --all-extras --format=pylock.toml --output-file=pylock.toml
33
lock-version = "1.0"
44
created-by = "uv"
55
requires-python = ">=3.10.0, <4.0"

0 commit comments

Comments
 (0)