File: noxfile.py

package info (click to toggle)
deepdiff 8.6.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,976 kB
  • sloc: python: 16,739; makefile: 167
file content (49 lines) | stat: -rw-r--r-- 1,052 bytes parent folder | download
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
"""nox configuration file."""

# ruff: noqa: ANN001, D401

import nox


@nox.session
def flake8(session) -> None:
    """Run flake8."""
    posargs = session.posargs if session.posargs else ["deepdiff"]
    session.install(".[cli,dev,static]")
    session.run(
        "python",
        "-m",
        "flake8",
        *posargs,
    )


@nox.session
def mypy(session) -> None:
    """Run mypy."""
    posargs = session.posargs if session.posargs else ["deepdiff"]
    session.install(".[cli,dev,static]")
    session.run(
        "python",
        "-m",
        "mypy",
        "--install-types",
        "--non-interactive",
        *posargs,
    )


@nox.session(python=["3.9", "3.10", "3.11", "3.12", "3.13"])
def pytest(session) -> None:
    """Test with pytest."""
    posargs = session.posargs if session.posargs else ["-vv", "tests"]
    session.install(".[cli,dev,static,test]")
    session.run(
        "python",
        "-m",
        "pytest",
        "--cov=deepdiff",
        "--cov-report",
        "term-missing",
        *posargs,
    )