Skip to content

Commit d0a6a7a

Browse files
chore: add pre-commit hook for checking uv is locked (#3416)
1 parent 6d7400e commit d0a6a7a

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

.github/workflows/lint-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
activate-environment: true
2828

2929
- name: Install dependencies
30-
run: uv sync --frozen
30+
run: uv sync --locked
3131

3232
- name: Run pre-commit hooks
3333
run: SKIP=ruff pre-commit run --all-files

.pre-commit-config.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,17 @@ repos:
1010
args: [--markdown-linebreak-ext=md]
1111
- repo: local
1212
hooks:
13+
- id: uv-lock
14+
name: uv-lock
15+
description: "Automatically run 'uv lock' on your project dependencies"
16+
entry: uv lock
17+
language: python
18+
files: ^(uv\.lock|pyproject\.toml|uv\.toml)$
19+
pass_filenames: false
1320
- id: ruff
1421
name: ruff
1522
description: Run ruff linting
16-
entry: uv run --frozen ruff check --force-exclude
23+
entry: uv run --locked ruff check --force-exclude
1724
language: system
1825
'types_or': [python, pyi]
1926
require_serial: true

0 commit comments

Comments
 (0)