-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
pyproject.toml
102 lines (90 loc) · 2.59 KB
/
pyproject.toml
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# --- Ruff Settings ------------------------------------------------------------
[tool.ruff]
target-version = "py38"
src = ["nutree", "tests"]
[tool.ruff.lint]
select = [
"B", # bugbear
"E", # pycodestyle
"F", # pyflakes
"G", # flake8-logging-format
"I", # isort
"UP", # pyupgrade
"T", # print, ...
# "D", # pydocstyle
]
ignore = [
# We need the old syntax for python <= 3.9
"UP006", # Use `list` instead of `List` for type annotations (since Py39)
"UP007", # Use `X | Y` for type annotations (since Py310)
"E721", # Do not compare types, use `isinstance()`
]
[tool.ruff.lint.per-file-ignores]
"*.ipynb" = [ # Jupyter Notebooks
"T20", # print statement
"E402", # module level import not at top of file
]
# [tool.ruff.lint.isort]
# case-sensitive = true
# [tool.ruff.pydocstyle]
# convention = "google"
# --- Pyright Settings ---------------------------------------------------------
[tool.pyright]
typeCheckingMode = "standard"
reportMissingImports = "none"
include = ["nutree", "tests"]
# https://github.com/microsoft/pyright/blob/main/docs/configuration.md#sample-pyprojecttoml-file
reportUnnecessaryTypeIgnoreComment = true
# --- Mypy Settings ------------------------------------------------------------
[tool.mypy]
warn_return_any = true
warn_unused_configs = true
# warn_unused_ignores = true
# warn_redundant_casts = true
# ignore_missing_imports = true
[[tool.mypy.overrides]]
module = [
"fabulist",
"pydot",
"pytest",
"pympler",
"pympler.asizeof",
"rdflib",
"rdflib.namespace",
]
ignore_missing_imports = true
# --- Pytest and Coverage Settings ---------------------------------------------
[tool.pytest.ini_options]
# addopts = "-ra -q --cov=nutree --cov-report=html"
addopts = "-ra -q --cov=nutree"
# addopts = "--cov=nutree --cov-report=html --cov-report=term-missing"
[tool.coverage.run]
# branch = true
omit = [
"tests/*",
"setup.py",
# nutree/leaves_cli.py
# nutree/cli_common.py
# nutree/monitor/*
]
[tool.coverage.report]
precision = 1
# show_missing = true
sort = "Name"
exclude_lines = [
"pragma: no cover",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]
exclude_also = [
# 1. Exclude an except clause of a specific form:
# "except ValueError:\\n\\s*assume\\(False\\)",
# 2. Comments to turn coverage on and off:
# "no cover: start(?s:.)*?no cover: stop",
# 3. A pragma comment that excludes an entire file:
# "\\A(?s:.*# pragma: exclude file.*)\\Z",
"\\A(?s:.*# pragma: exclude-file-from-coverage.*)\\Z",
]
[tool.coverage.html]
directory = "build/coverage"