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

Method _get_subcommands

tests/test_store.py:473–480  ·  view source on GitHub ↗

Read the subcommands list for a manpage from the DB.

(self, store: Store, source: str)

Source from the content-addressed store, hash-verified

471 return {src: dst for src, dst in store.mappings()}
472
473 def _get_subcommands(self, store: Store, source: str) -> list[str]:
474 """Read the subcommands list for a manpage from the DB."""
475 import json
476
477 row = store._conn.execute(
478 "SELECT subcommands FROM parsed_manpages WHERE source = ?", (source,)
479 ).fetchone()
480 return json.loads(row["subcommands"]) if row else []
481
482
483class TestUpdateSubcommandMappingsLlm(_SubcommandTestBase):

Calls

no outgoing calls

Tested by

no test coverage detected