Delete the eight functions nobody called

Measured, not guessed: every top-level def in every tracked .py file was
counted against every other tracked file, including markdown, scripts, Go
and TypeScript. Eight names had zero references anywhere:
cartridges_holding_atom and clear_mounts (memory.py reads each cartridge's
own sources.json, and set_mounts already clears by replacing the set),
gradient_checkpointing_enabled, group_hits_by_source, ingested_paths,
is_finite_number, parse_runtime_json (the runtime answers in prose now, and
the JSON path was never wired back), write_sources_json.

Typer commands and pytest cases were excluded from the count because a
framework calls them by name. The same scan now returns zero.

263 tests pass; repo-wide mypy is still 24 errors in 6 files, unchanged.
This commit is contained in:
ZacharyZhang-NY committed 2026-10-08 07:38:36 -04:00
1 parent 330e801e92
commit 56b94cd58e
7 files changed
-59

No files matched your search

@@ -314,8 +314,3 @@ def extract_generic_calls(text: str) -> list[dict[str, str]]:
return calls
def write_sources_json(path: Path, sources: list[SourceRecord]) -> None:
path.write_text(
json.dumps([source.model_dump(mode="json") for source in sources], ensure_ascii=False, indent=2),
encoding="utf-8",
)