Skip to content

Commit 28d6112

Browse files
authored
Replace pre-commit with prek (#276)
1 parent 7bb758f commit 28d6112

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed

.github/CONTRIBUTING.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@
22

33
## Linting
44

5-
Linting is run on the CI using [pre-commit](https://pre-commit.com/), and can be run
6-
locally:
5+
Linting is run on the CI using [prek](https://prek.j178.dev//), and can be run locally:
76

87
```sh
9-
pip install pre-commit
10-
pre-commit install # optional: to run when you commit, on just the staged changes
11-
pre-commit run --all-files # to run on all files now
8+
pip install prek
9+
prek install # optional: to run when you commit, on just the staged changes
10+
prek run --all-files # to run on all files now
1211
```
1312

1413
## Docstrings

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- uses: actions/setup-python@v6
2020
with:
2121
python-version: "3.x"
22-
- uses: tox-dev/action-pre-commit-uv@v1
22+
- uses: j178/prek-action@v1
2323

2424
mypy:
2525
runs-on: ubuntu-latest

tox.ini

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,9 @@ commands =
3030
[testenv:lint]
3131
skip_install = true
3232
deps =
33-
pre-commit-uv
34-
pass_env =
35-
PRE_COMMIT_COLOR
33+
prek
3634
commands =
37-
pre-commit run --all-files --show-diff-on-failure
35+
prek run --all-files --show-diff-on-failure
3836

3937
[testenv:mypy]
4038
deps =

0 commit comments

Comments
 (0)