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:
1 parent
330e801e92
commit
56b94cd58e
7 files changed
-59
No files matched your search
@@ -169,13 +169,6 @@ class RetrievalService:
|
||||
return [hit.atom for hit in self.search(query, top_k, filters=filters).hits]
|
||||
|
||||
|
||||
def group_hits_by_source(hits: list[RetrievalHit]) -> dict[str, list[RetrievalHit]]:
|
||||
grouped: dict[str, list[RetrievalHit]] = defaultdict(list)
|
||||
for hit in hits:
|
||||
grouped[hit.atom.source].append(hit)
|
||||
return dict(grouped)
|
||||
|
||||
|
||||
def encode_cursor(offset: int) -> str:
|
||||
return base64.urlsafe_b64encode(str(offset).encode()).decode()
|
||||
|
||||
|
||||
Reference in new issue
Block a user