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

Method distros

explainshell/store.py:403–412  ·  view source on GitHub ↗

Return distinct (distro, release) pairs from manpages.

(self)

Source from the content-addressed store, hash-verified

401 ]
402
403 def distros(self) -> list[tuple[str, str]]:
404 """Return distinct (distro, release) pairs from manpages."""
405 rows = self._conn.execute("""
406 SELECT DISTINCT
407 SUBSTR(source, 1, INSTR(source, '/') - 1) as distro,
408 SUBSTR(source, INSTR(source, '/') + 1,
409 INSTR(SUBSTR(source, INSTR(source, '/') + 1), '/') - 1) as release
410 FROM parsed_manpages
411 """).fetchall()
412 return [(row["distro"], row["release"]) for row in rows]
413
414 def distros_for_name(self, name: str) -> list[tuple[str, str]]:
415 """Return (distro, release) pairs that have a manpage matching *name*."""

Callers 6

show_distrosFunction · 0.95
create_appFunction · 0.95
test_no_duplicatesMethod · 0.80
_use_storeFunction · 0.80

Calls

no outgoing calls

Tested by 4

test_no_duplicatesMethod · 0.64
_use_storeFunction · 0.64