Commit 49c94d1
build(lint): make pyproject.toml the single source of truth for pylint
There were two divergent pylint configs: the `make lint` gate ran
`pylint --disable=all --enable=<7 checks>` (an allowlist, in the
Makefile via PYLINT_GATE_CHECKS), while `[tool.pylint.master]` in
pyproject carried a ~30-entry *denylist* that only an ad-hoc /
IDE `pylint <file>` saw. They expressed the same intent ("enforce only
a few pylint checks") in opposite directions, so a bare/IDE run actually
fired a different, larger set than the gate — the opposite of IDE/gate
parity — and the master block needed a warning comment not to disable a
check the gate enables.
Collapse to one config in pyproject.toml:
- `[tool.pylint.messages_control]` now holds `disable = ["all"]` + the
same 7-check `enable` allowlist the gate used. Every invocation —
`make lint`, ad-hoc `pylint <file>`, IDE/Pylance — reads it and
behaves identically.
- `[tool.pylint.main] ignore-paths = [".*/tests/.*"]` moves the
test exemption (tests reach across the private boundary by design,
source_files.md §5.2) into config, so even a directly-opened test
file self-exempts in the IDE.
- The Makefile no longer defines the check set or a non-test file list.
PYLINT_GATE_CHECKS and PYLINT_GATE_FILES are removed; the gate runs
`pylint --score=n --recursive=y <3 package roots>` and lets config
drive both which checks fire and which paths are skipped.
- Dropped the now-dead `max-line-length` (line-too-long isn't enabled
under the allowlist; black enforces 120).
Verified: gate clean; ad-hoc `pylint <file>` runs only the 7 checks; a
mutable-default probe still fires `dangerous-default-value`; a test file
self-exempts from `protected-access`. make lint clean. Tooling-only
change — no runtime source touched, so the test suite is unaffected.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent d39db78 commit 49c94d1
2 files changed
Lines changed: 54 additions & 64 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 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 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
46 | 29 | | |
47 | 30 | | |
48 | 31 | | |
| |||
128 | 111 | | |
129 | 112 | | |
130 | 113 | | |
131 | | - | |
| 114 | + | |
132 | 115 | | |
133 | 116 | | |
134 | 117 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
0 commit comments