-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnoxfile.py
57 lines (38 loc) · 1.18 KB
/
noxfile.py
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
"""Nox test configuration.
See: https://nox.thea.codes/en/stable/config.html
"""
import nox
@nox.session(python=["3.12", "3.13"], reuse_venv=True)
def tests(session: nox.Session) -> None:
"""Run the test suite."""
session.run("poetry", "install", "--only=test", external=True)
session.run("pytest")
@nox.session
def lint(session: nox.Session) -> None:
session.install("flake8")
session.run("flake8")
@nox.session
def type_check_with_mypy(session: nox.Session) -> None:
session.install("mypy")
session.run("mypy")
@nox.session
def type_check_with_pyright(session: nox.Session) -> None:
session.install("pyright")
session.run("pyright")
@nox.session
def type_check_with_pytype(session: nox.Session) -> None:
session.install("pytype")
session.run("pytype")
@nox.session
def type_check_with_pyre(session: nox.Session) -> None:
session.install("pyre-check")
session.run("pyre")
@nox.session
def type_check_with_basedpyright(session: nox.Session) -> None:
session.install("basedpyright")
session.run("basedpyright")
@nox.session
def noop(session: nox.Session) -> None:
"""Do nothing.
A dummy session that always passes.
"""