chore: use prek in noxfile/ci (#2681)
This commit is contained in:
@@ -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
@@ -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
@@ -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"])
|
||||||
|
|||||||
Reference in New Issue
Block a user