-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnoxfile.py
More file actions
38 lines (29 loc) · 846 Bytes
/
noxfile.py
File metadata and controls
38 lines (29 loc) · 846 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
from pathlib import Path
import nox
DIR = Path(__file__).parent.resolve()
PROJECT = nox.project.load_toml()
nox.needs_version = ">=2025.2.9"
nox.options.default_venv_backend = "uv|virtualenv"
@nox.session
def lint(session: nox.Session) -> None:
"""
Run the linter.
"""
session.install("pre-commit")
session.run("pre-commit", "run", "--all-files", *session.posargs)
@nox.session
def pylint(session: nox.Session) -> None:
"""
Run Pylint.
"""
# This needs to be installed into the package environment, and is slower
# than a pre-commit check
session.install("-e.", "pylint>=3.2")
session.run("pylint", "projectname", *session.posargs)
@nox.session
def style(session: nox.Session) -> None:
"""
Run the linter and Pylint.
"""
session.notify("lint")
session.notify("pylint")