MCPcopy Index your code
hub / github.com/idank/explainshell / _make_mp

Method _make_mp

tests/test_store.py:451–467  ·  view source on GitHub ↗
(
        self,
        name: str,
        section: str = "1",
        *,
        extractor: str | None = None,
        subcommands: list[str] | None = None,
    )

Source from the content-addressed store, hash-verified

449 """Shared helpers for subcommand mapping tests."""
450
451 def _make_mp(
452 self,
453 name: str,
454 section: str = "1",
455 *,
456 extractor: str | None = None,
457 subcommands: list[str] | None = None,
458 ) -> ParsedManpage:
459 source = f"ubuntu/26.04/{section}/{name}.{section}.gz"
460 return ParsedManpage(
461 source=source,
462 name=name,
463 synopsis=f"{name} - do things",
464 aliases=[(name, 10)],
465 extractor=extractor,
466 subcommands=subcommands or [],
467 )
468
469 def _get_mappings(self, store: Store) -> dict[str, str]:
470 """Return {src: dst} for all mappings in the store."""

Calls 1

ParsedManpageClass · 0.90

Tested by

no test coverage detected