Skip to content

Commit 99059b7

Browse files
authored
chore: use prek in noxfile/ci (#2681)
1 parent d0e070e commit 99059b7

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
id: python
4343
with:
4444
python-version: "3.x"
45-
- uses: pre-commit/action@v3.0.1
45+
- uses: j178/prek-action@v1
4646
- name: PyLint checks
4747
run: pipx run --python "${{ steps.python.outputs.python-path }}" nox -s pylint -- --output-format=github
4848

bin/bump_version.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python3
22

33
# /// script
4-
# dependencies = ["click", "packaging"]
4+
# dependencies = ["click", "packaging", "prek"]
55
# ///
66

77

@@ -139,7 +139,7 @@ def bump_version() -> None:
139139
# run pre-commit to update the README changelog
140140
subprocess.run(
141141
[
142-
"pre-commit",
142+
"prek",
143143
"run",
144144
"--files=docs/changelog.md",
145145
],
@@ -149,7 +149,7 @@ def bump_version() -> None:
149149
# run pre-commit to check that no errors occurred on the second run
150150
subprocess.run(
151151
[
152-
"pre-commit",
152+
"prek",
153153
"run",
154154
"--files=docs/changelog.md",
155155
],

noxfile.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ def lint(session: nox.Session) -> None:
3333
"""
3434
Run the linter.
3535
"""
36-
session.install("pre-commit")
37-
session.run("pre-commit", "run", "--all-files", *session.posargs)
36+
session.install("prek")
37+
session.run("prek", "run", "--all-files", *session.posargs)
3838

3939

4040
@nox.session(tags=["lint"])

0 commit comments

Comments
 (0)