Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
27 lines (23 loc) · 1.85 KB
/
Copy pathpyproject.toml
File metadata and controls
27 lines (23 loc) · 1.85 KB
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
# Configuration of the Python lint and type checks (.github/workflows/lint-python.yml, dm/tools/lint_python.py) and of the tool tests' coverage (the coverage job of
# .github/workflows/tests.yml); the repository is not a Python package.
# Scope: scripts/ and the tools under dm/. extraPaths / extra-paths are the folders the tools put on sys.path to import each other.
[tool.pyright]
include = ["scripts", "dm/tools", "dm/gfx/tools", "dm/games/game.py", "dm/games/profile_guess.py", "dm/games/settings.py", "dm/ios/tools", "dm/mac"]
extraPaths = ["dm/tools", "dm/gfx/tools", "dm/games", "dm/ios/tools", "dm/mac", "dm/tools/fuzz"]
typeCheckingMode = "basic"
pythonVersion = "3.14"
pythonPlatform = "Darwin"
[tool.ruff]
target-version = "py310"
include = ["scripts/**/*.py", "dm/tools/**/*.py", "dm/gfx/tools/**/*.py", "dm/games/*.py", "dm/ios/tools/**/*.py", "dm/mac/**/*.py"]
# Rules that find bugs (pyflakes, syntax, bugbear, pylint's errors and warnings, a few of ruff's own), not style: the code's dense layout (several statements on a
# line, star imports of the rewriter's tables, short names) is the house style, so those rules are off, and `ruff format` is not used.
[tool.ruff.lint]
select = ["F", "E7", "E9", "B", "PLE", "PLW", "PIE", "ISC001", "T10", "RUF006", "RUF008", "RUF009", "RUF013", "RUF016", "RUF017", "RUF018", "RUF024", "RUF026"]
ignore = ["F403", "F405", "E701", "E702", "E731", "E741", "B007", "B905", "PLW0603", "PLW1510", "PLW2901"]
# coverage.py over the tool tests (docs/development.md, Continuous integration): the tools' folders, not their tests. Subprocesses are measured too (the tests run
# many tools with sys.executable), each writing its own data file beside .coverage; `coverage combine` joins them. Run from the repository's root.
[tool.coverage.run]
source = ["dm/tools", "dm/gfx/tools", "dm/games", "scripts"]
omit = ["*/tests/*"]
patch = ["subprocess"]