-
Notifications
You must be signed in to change notification settings - Fork 34
/
pyproject.toml
95 lines (86 loc) · 2.3 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
[tool.mypy]
strict = true
follow_imports = 'silent' # https://github.com/python-lsp/pylsp-mypy/issues/81
scripts_are_modules = true # allow checking all scripts in one invocation
warn_return_any = false
[[tool.mypy.overrides]]
# things which may be unavailable when running checks
module = [
'libvirt',
'libvirt_qemu',
'nacl',
'pika.*',
]
ignore_missing_imports = true
[[tool.mypy.overrides]]
# https://github.com/python/mypy/issues/11401 prevents us from enabling strict
# mode for a given set of files, so instead, we disable the failing checks for
# the files which aren't strictly typed. Hopefully this decreases with time.
check_untyped_defs = false
disallow_untyped_calls = false
disallow_untyped_defs = false
warn_return_any = false
module = [
'task',
'test_github',
'test_issue_scan',
'test_task',
'test_test_failure_policy',
'test_tests_scan',
'cockpit-lib-update',
'image-refresh',
'image-trigger',
'naughty-prune',
'npm-update',
'po-refresh',
'store-tests',
'tasks-container-update',
'tests-status',
]
[tool.ruff]
exclude = [
".git/",
]
line-length = 118
preview = true
target-version = 'py312'
[tool.ruff.lint]
select = [
"A", # flake8-builtins
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"D300", # pydocstyle: Forbid ''' in docstrings
"DTZ", # flake8-datetimez
"E", # pycodestyle
"EXE", # flake8-executable
"F", # pyflakes
"G", # flake8-logging-format
"I", # isort
"ICN", # flake8-import-conventions
"PLE", # pylint errors
"ISC", # flake8-implicit-str-concat
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PLE", # pylint errors
"RSE", # flake8-raise
"RUF", # ruff rules
"T10", # flake8-debugger
"TCH", # flake8-type-checking
"UP032", # f-string
"W", # warnings (mostly whitespace)
"YTT", # flake8-2020
]
[tool.pytest.ini_options]
addopts = ["--cov-config=pyproject.toml"] # for subprocesses
pythonpath = ["."]
required_plugins = ["pytest-asyncio"]
asyncio_mode = 'auto'
[tool.coverage.run]
branch = true
[tool.coverage.report]
show_missing = true
skip_covered = true
exclude_lines = [
"pragma: no cover", # default
"raise NotImplementedError",
]