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