chore: use prek in noxfile/ci (#2681)

This commit is contained in:
Henry Schreiner
2025-12-23 18:51:19 -05:00
committed by GitHub
parent d0e070e278
commit 99059b7442
3 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -42,7 +42,7 @@ jobs:
id: python id: python
with: with:
python-version: "3.x" python-version: "3.x"
- uses: pre-commit/action@v3.0.1 - uses: j178/prek-action@v1
- name: PyLint checks - name: PyLint checks
run: pipx run --python "${{ steps.python.outputs.python-path }}" nox -s pylint -- --output-format=github run: pipx run --python "${{ steps.python.outputs.python-path }}" nox -s pylint -- --output-format=github
+3 -3
View File
@@ -1,7 +1,7 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# /// script # /// script
# dependencies = ["click", "packaging"] # dependencies = ["click", "packaging", "prek"]
# /// # ///
@@ -139,7 +139,7 @@ def bump_version() -> None:
# run pre-commit to update the README changelog # run pre-commit to update the README changelog
subprocess.run( subprocess.run(
[ [
"pre-commit", "prek",
"run", "run",
"--files=docs/changelog.md", "--files=docs/changelog.md",
], ],
@@ -149,7 +149,7 @@ def bump_version() -> None:
# run pre-commit to check that no errors occurred on the second run # run pre-commit to check that no errors occurred on the second run
subprocess.run( subprocess.run(
[ [
"pre-commit", "prek",
"run", "run",
"--files=docs/changelog.md", "--files=docs/changelog.md",
], ],
+2 -2
View File
@@ -33,8 +33,8 @@ def lint(session: nox.Session) -> None:
""" """
Run the linter. Run the linter.
""" """
session.install("pre-commit") session.install("prek")
session.run("pre-commit", "run", "--all-files", *session.posargs) session.run("prek", "run", "--all-files", *session.posargs)
@nox.session(tags=["lint"]) @nox.session(tags=["lint"])