blob: ba959eb1eeff9a5965ad7314719d47db04945106 (
plain) (
blame)
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
|
# Author: cirakg & claude ai
# Summary: Settings for pytest, ruff and mypy, which check the Python tools in tools/.
#
# Configuration for the Python tools in tools/ (they run inside the dev image).
# This is not a Python package; the file only configures pytest, ruff and mypy.
# Caches go to build/ so the source tree stays clean.
[tool.pytest.ini_options]
testpaths = ["tools/tests"]
cache_dir = "build/.pytest_cache"
addopts = "-p no:cacheprovider"
# Warnings are errors here too (README section 17.7).
filterwarnings = ["error"]
[tool.ruff]
line-length = 120
target-version = "py310"
cache-dir = "build/.ruff_cache"
include = ["tools/**/*.py"]
[tool.ruff.lint]
select = ["E", "F", "W", "I", "B", "UP", "SIM", "RUF", "PL"]
ignore = [
"PLR2004", # magic values are fine in tests and small CLI tools
"PLR0912", # branchy parsers read better as one function
]
[tool.mypy]
python_version = "3.10"
strict = true
files = ["tools"]
cache_dir = "build/.mypy_cache"
|