Debian Codegraph @

noxfile.py

raw
1 """nox configuration file."""
2
3 # ruff: noqa: ANN001, D401
4
5 import nox
6
7
8 @nox.session
9 def flake8(session) -> None:
10 """Run flake8."""
11 posargs = session.posargs if session.posargs else ["deepdiff"]
12 session.install(".[cli,dev,static]")
13 session.run(
14 "python",
15 "-m",
16 "flake8",
17 *posargs,
18 )
19
20
21 @nox.session
22 def mypy(session) -> None:
23 """Run mypy."""
24 posargs = session.posargs if session.posargs else ["deepdiff"]
25 session.install(".[cli,dev,static]")
26 session.run(
27 "python",
28 "-m",
29 "mypy",
30 "--install-types",
31 "--non-interactive",
32 *posargs,
33 )
34
35
36 @nox.session(python=["3.10", "3.11", "3.12", "3.13", "3.14"])
37 def pytest(session) -> None:
38 """Test with pytest."""
39 posargs = session.posargs if session.posargs else ["-vv", "tests"]
40 session.install(".[cli,dev,static,test]")
41 session.run(
42 "python",
43 "-m",
44 "pytest",
45 "--cov=deepdiff",
46 "--cov-report",
47 "term-missing",
48 *posargs,
49 )