summaryrefslogtreecommitdiffstats
path: root/pyproject.toml
blob: f0e8427aa90de41c705f48b8f917a1c226eaf094 (plain)
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
[tool.coverage.run]
branch = true
source = ["."]
omit = [
  "*/lib/python*/*",
  "*/dist-packages/*",
  "*/tests/*",
]

[tool.coverage.report]
# Lets not force ourselves to sprinkle "pragma: no cover" in the following cases
exclude_lines = [
    # Have to re-enable the standard pragma
    "pragma: no cover",

    # Ignore code that is not intended to be run
    "if TYPE_CHECKING:",
    "raise AssertionError",

    # Ignore "..." (overload)
    "^\\s+[.][.][.]\\s*$",

    # We cannot hit this via tests.  On the flip-side, we should ensure this
    # only call a main() (or a similar function).
    "if __name__ == .__main__.:",

    # Do not complain about abstract methods as they are not run
    "@(abc\\.)?abstractmethod",
    "raise NotImplementedError([(][)]|\\s*$)",
]

[tool.pytest.ini_options]
addopts = "--doctest-modules"
norecursedirs = [
    "local",
    "debian",
]
pythonpath = [
    "src"
]
testpaths = [
    "src",
    "tests",
    "self-hosting-plugins",
]

[tool.mypy]
mypy_path = "typing-stubs"