|
10 | 10 | // repeated here rather than silently dropped. |
11 | 11 | "exclude": ["**/node_modules", "**/.*", "**/__pycache__", ".venv", "dist"], |
12 | 12 | "pythonVersion": "3.11", |
13 | | - "typeCheckingMode": "standard", |
14 | | - "reportMissingTypeStubs": false |
| 13 | + |
| 14 | + // Strict, minus the rules that are pure noise for this codebase's idioms. |
| 15 | + // Each exception is a whole category we would otherwise suppress inline |
| 16 | + // dozens of times, which hides real findings rather than surfacing them. |
| 17 | + "typeCheckingMode": "strict", |
| 18 | + |
| 19 | + "reportMissingTypeStubs": false, |
| 20 | + |
| 21 | + // lxml-stubs and Pydantic's internals expose many values as Unknown. These |
| 22 | + // fire ~90 times across the models and builders with nothing actionable |
| 23 | + // behind them; turning them off keeps strict's genuine checks visible. |
| 24 | + "reportUnknownVariableType": false, |
| 25 | + "reportUnknownArgumentType": false, |
| 26 | + "reportUnknownMemberType": false, |
| 27 | + "reportUnknownParameterType": false, |
| 28 | + "reportUnknownLambdaType": false, |
| 29 | + |
| 30 | + // The UBL models share a deliberate cross-module internal API (`_leaf`, |
| 31 | + // `_money`, `_UblModel`, `_Base`). That is by design, not a leak. |
| 32 | + "reportPrivateUsage": false, |
| 33 | + |
| 34 | + // Pydantic `mode="before"` validators genuinely receive `Any` at runtime, |
| 35 | + // so the isinstance/type checks they perform are necessary, not redundant. |
| 36 | + "reportUnnecessaryIsInstance": false, |
| 37 | + |
| 38 | + // Requiring an explicit annotation on every test helper and lambda is noise |
| 39 | + // for a test suite; src is covered by mypy --strict regardless. |
| 40 | + "reportMissingParameterType": false |
15 | 41 | } |
0 commit comments