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

Method delete_manpage

explainshell/store.py:263–275  ·  view source on GitHub ↗

Delete a manpage and its mappings (via CASCADE) from the store. Deleting from manpages cascades to parsed_manpages, which in turn cascades to mappings. Returns True if a row was deleted, False if the source was not found.

(self, source: str)

Source from the content-addressed store, hash-verified

261 return row is not None
262
263 def delete_manpage(self, source: str) -> bool:
264 """Delete a manpage and its mappings (via CASCADE) from the store.
265
266 Deleting from manpages cascades to parsed_manpages, which in turn
267 cascades to mappings.
268
269 Returns True if a row was deleted, False if the source was not found.
270 """
271 cur = self._conn.execute("DELETE FROM manpages WHERE source = ?", (source,))
272 if cur.rowcount:
273 self._conn.commit()
274 return True
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.

Callers 1

apply_decisionsFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected