-
-
Notifications
You must be signed in to change notification settings - Fork 151
/
pyproject.toml
97 lines (83 loc) · 2.41 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
[tool.ruff]
# Decrease the maximum line length to 79 characters.
# line-length = 79
# Support Python 3.10+.
target-version = "py38"
src = ["wsgidav", "tests"]
[tool.ruff.lint]
select = [
"B", # bugbear
"E", # pycodestyle
"F", # pyflakes
"G", # flake8-logging-format
"UP", # pyupgrade
"T", # print, ...
# "D", # pydocstyle
"I", # isort
# "C", # codespell
# "SIM", #
]
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()`
"E501", # Line too long
"G001", # Logging statement uses str.format
"G002", # Logging statement uses % formatting
"G004", # Logging format string does not contain any variables
"T201", # `print()` statement found
"T203", # `pprint()` statement found
"UP031", # Use format specifiers instead of percent format
]
[tool.ruff.lint.isort]
known-first-party = ["wsgidav", "tests"]
[tool.codespell]
skip = '.git,*.pdf,*.svg,*.lock,*.css,logs'
check-hidden = true
# ignore-regex = ''
# ignore-words-list = ''
# --- Pytest and Coverage Settings ---------------------------------------------
[tool.pytest.ini_options]
# addopts = "-ra -q --cov=wsgidav"
testpaths = [
# ".",
"tests/*.py"
]
markers = [
"benchmarks: include slow benchmarks (enable with '-m benchmarks')",
# "slow: marks tests as slow (deselect with '-m \"not slow\"')",
# "serial",
]
[tool.coverage.run]
# branch = true
omit = [
"tests/*",
"setup.py",
"wsgidav/prop_man/couch_property_manager.py",
"wsgidav/prop_man/mongo_property_manager.py",
"wsgidav/samples/*",
"wsgidav/server/run_reloading_server.py",
"wsgidav/server/server_sample.py",
]
[tool.coverage.report]
precision = 2
# 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"