feat(types): Complete strict static analysis and typing track

This commit is contained in:
2026-03-04 09:46:02 -05:00
parent c6c2a1b40c
commit fe2114a2e0
46 changed files with 606 additions and 795 deletions

View File

@@ -26,7 +26,7 @@ context block that replaces full file contents in the initial <context> send.
import ast
import re
from pathlib import Path
from typing import Callable
from typing import Callable, Any
# ------------------------------------------------------------------ per-type extractors
@@ -160,7 +160,7 @@ def summarise_file(path: Path, content: str) -> str:
except Exception as e:
return f"_Summariser error: {e}_"
def summarise_items(file_items: list[dict]) -> list[dict]:
def summarise_items(file_items: list[dict[str, Any]]) -> list[dict[str, Any]]:
"""
Given a list of file_item dicts (as returned by aggregate.build_file_items),
return a parallel list of dicts with an added `summary` key.
@@ -178,7 +178,7 @@ def summarise_items(file_items: list[dict]) -> list[dict]:
result.append({**item, "summary": summary})
return result
def build_summary_markdown(file_items: list[dict]) -> str:
def build_summary_markdown(file_items: list[dict[str, Any]]) -> str:
"""
Build a compact markdown string of file summaries, suitable for the
initial <context> block instead of full file contents.