We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0881ec1 commit a2272b0Copy full SHA for a2272b0
chapter09-linting-with-ruff-and-pre-commit/noxfile.py
@@ -10,7 +10,7 @@
10
import nox
11
12
nox.options.error_on_external_run = True
13
-nox.options.sessions = ["tests"]
+nox.options.sessions = ["lint", "tests"]
14
15
16
def constraints(session):
@@ -50,9 +50,10 @@ def build(session):
50
51
@nox.session
52
def lint(session):
53
- """Lint using Ruff."""
54
- session.install("ruff")
55
- session.run("ruff", "check")
+ """Lint using pre-commit."""
+ options = ["--all-files", "--show-diff-on-fail"]
+ session.install("pre-commit")
56
+ session.run("pre-commit", "run", *options, *session.posargs)
57
58
59
def install_coverage_pth(session):
0 commit comments