-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathpyproject.toml
More file actions
72 lines (62 loc) · 2.52 KB
/
Copy pathpyproject.toml
File metadata and controls
72 lines (62 loc) · 2.52 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
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
[project]
name = "grimoire"
version = "0.1.2"
requires-python = ">=3.14"
[tool.ruff]
target-version = "py314"
line-length = 88
extend-include = ["grimoire"]
# Honor format's exclude of `grimoire` even when the path is passed explicitly
# (e.g. by pre-commit / `ruff format grimoire`), not only during directory discovery.
force-exclude = true
[tool.ruff.lint]
select = ["E", "F", "B", "I", "UP", "W", "TC", "PERF", "S", "PLW", "SIM", "PTH", "RUF", "FURB", "A", "ISC", "C901"]
ignore = [
"E501",
"W191",
]
# Complexity ceiling as a ratchet: blocks new sprawl without forcing the small
# functions to fragment. Only main is ignored since it dispatches all the program.
[tool.ruff.lint.mccabe]
max-complexity = 20
[tool.ruff.lint.per-file-ignores]
# Tests legitimately shell out to git/pacman with known, fixed argv.
"tests/**" = ["S603", "S607"]
[tool.ruff.format]
indent-style = "tab"
# `grimoire` is hand-aligned for readability (tab-aligned fields/constants); the formatter
# would collapse that. Lint it (extend-include above) but never auto-format it.
exclude = ["grimoire"]
[tool.mypy]
python_version = "3.14"
files = ["grimoire"]
scripts_are_modules = true # grimoire has no .py extension
strict = true
[tool.pyright]
include = ["grimoire", "tests"]
pythonVersion = "3.14"
typeCheckingMode = "strict"
[tool.pylint.messages_control]
disable = [
"C0114", # missing-module-docstring
"C0115", # missing-class-docstring
"C0116", # missing-function-docstring
"C0301", # line-too-long: ruff owns line length (E501 ignored there)
"C0302", # too-many-lines: intentional single-file program
"C0415", # import-outside-toplevel: deliberate lazy imports (startup cost)
"W1514", # unspecified-encoding: codebase relies on the UTF-8 default (Arch tooling)
]
# Keep the design metrics ON, but align their thresholds with the ruff C901 ratchet
# (max-complexity=20) and the codebase's actual orchestrators, so the two tools agree
# instead of double-reporting. Functions still over these (only main, the dispatch) carry
# a targeted inline disable, the same way main already carries `# noqa: C901`.
[tool.pylint.design]
max-args = 13 # install_package: the central recursive orchestrator's keyword options
max-locals = 25
max-branches = 20 # == ruff C901
max-statements = 80 # covers build_parser's flat argparse setup
max-returns = 8
max-attributes = 10 # SearchResult is an 8-field display/install DTO
[tool.pylint.format]
max-line-length = 88
indent-string = "\t" # the codebase indents with tabs (cf. ruff W191 ignore)