Skip to content

Commit 1eed933

Browse files
authored
use uv run --no-sync in pre-commit commands (#6472)
allow pre-commit to work whether you have activated the virtualenv or not
1 parent 88a9e0a commit 1eed933

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

.pre-commit-config.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ repos:
44
hooks:
55
- id: ruff-format
66
name: ruff-format
7-
entry: ruff format
7+
entry: uv run --no-sync ruff format
88
language: system
99
types_or: [python, markdown]
1010
require_serial: true
1111
- id: ruff-check
1212
name: ruff-check
13-
entry: ruff check
13+
entry: uv run --no-sync ruff check
1414
language: system
1515
args: [--fix, --exit-non-zero-on-fix]
1616
types_or: [python, pyi]
@@ -19,7 +19,7 @@ repos:
1919
hooks:
2020
- id: codespell
2121
name: codespell
22-
entry: codespell
22+
entry: uv run --no-sync codespell
2323
language: system
2424
types: [text]
2525
require_serial: true
@@ -28,15 +28,15 @@ repos:
2828
- id: update-pyi-files
2929
name: update-pyi-files
3030
description: Update pyi files as needed
31-
entry: python3 scripts/make_pyi.py
31+
entry: uv run --no-sync python scripts/make_pyi.py
3232
language: system
3333
always_run: true
3434
require_serial: true
3535
- repo: local
3636
hooks:
3737
- id: pyright
3838
name: pyright
39-
entry: pyright
39+
entry: uv run --no-sync pyright
4040
language: system
4141
types: [python]
4242
require_serial: true

0 commit comments

Comments
 (0)