-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnoxfile.py
More file actions
36 lines (26 loc) · 790 Bytes
/
Copy pathnoxfile.py
File metadata and controls
36 lines (26 loc) · 790 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
import nox
import nox_uv
# Nox sessions and configuration
# https://nox.thea.codes/en/stable/config.html
nox.options.default_venv_backend = "uv"
@nox_uv.session(uv_only_groups=["black"])
def black(session: nox.Session) -> None:
session.run("black", "--check", "--diff", ".")
@nox_uv.session(uv_groups=["mypy"])
def mypy(session: nox.Session) -> None:
session.run("mypy", "--install-types", "--non-interactive", ".")
@nox_uv.session(uv_only_groups=["ruff"])
def ruff(session: nox.Session) -> None:
session.run("ruff", "check", "--diff", ".")
@nox_uv.session(
uv_groups=["test"],
python=[
"3.10",
"3.11",
"3.12",
"3.13",
"3.14",
],
)
def test(session: nox.Session) -> None:
session.run("pytest", *session.posargs)