fix(types): mypy clean again over src; stub-less libraries and the benchmark imports handled in pyproject

66 errors had accumulated in src since the last green run (the hunt modules of groups 4-6, stats, candidates,
runner). Codex typed them without behaviour change; the 17 inline import-untyped ignores it added are replaced by
one override for dspy, pandas, statsmodels and scikit-learn, and the hunt package's lazy imports of benchmarks/
(never type-checked, not in files) are followed silently so src stays strict against their signatures.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
Marius Ciepluch
2026-10-14 03:03:12 +02:00
co-authored by Claude Fable 5.1
parent 0d7d3f0dc9
commit c8f7610313
17 changed files with 78 additions and 36 deletions
+5 -2
View File
@@ -752,8 +752,11 @@ class LabelBuilder:
if not function:
lines = self._clone(population, str(case["id"])).lines(str(case["vulnerable"]), site_path)
language = detect_language(Path(site_path))
covered = lines and language in DECLARATION and line <= len(lines)
function = enclosing(lines, line - 1, language) if covered else MODULE_FUNCTION
function = (
enclosing(lines, line - 1, language)
if lines and language in DECLARATION and line <= len(lines)
else MODULE_FUNCTION
)
self._row(
candidate=f"{site_path}::{function}", family=str(row.get("family") or case["family"]), label=label, source=source.id,
source_ref=f"{Path(path).name}#{key}[{index}]", unit="pin", weight=1.0, split=population.id,