MCPcopy Create free account
hub / github.com/idank/explainshell / known_sha256s

Method known_sha256s

explainshell/store.py:277–288  ·  view source on GitHub ↗

Return a mapping of source_gz_sha256 → source for all stored manpages. Only includes rows that have both a sha256 and a matching parsed_manpages entry. When multiple sources share the same hash, an arbitrary one wins.

(self)

Source from the content-addressed store, hash-verified

275 return False
276
277 def known_sha256s(self) -> dict[str, str]:
278 """Return a mapping of source_gz_sha256 → source for all stored manpages.
279
280 Only includes rows that have both a sha256 and a matching parsed_manpages
281 entry. When multiple sources share the same hash, an arbitrary one wins.
282 """
283 rows = self._conn.execute(
284 "SELECT m.source_gz_sha256, m.source FROM manpages m"
285 " JOIN parsed_manpages p ON p.source = m.source"
286 " WHERE m.source_gz_sha256 IS NOT NULL"
287 ).fetchall()
288 return {row["source_gz_sha256"]: row["source"] for row in rows}
289
290 def extractor_info_index(self) -> dict[str, tuple[str, ExtractionMeta]]:
291 """Return source -> (extractor, meta) for all parsed manpages."""

Callers 1

__post_init__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected