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

Method add_mapping

explainshell/store.py:430–434  ·  view source on GitHub ↗
(self, src: str, dst: str, score: int)

Source from the content-addressed store, hash-verified

428 return [(row["distro"], row["release"]) for row in rows]
429
430 def add_mapping(self, src: str, dst: str, score: int) -> None:
431 self._conn.execute(
432 "INSERT INTO mappings(src, dst, score) VALUES (?, ?, ?)", (src, dst, score)
433 )
434 self._conn.commit()
435
436 def has_mapping(self, src: str, dst: str) -> bool:
437 """Return whether a mapping from *src* to *dst* already exists."""

Calls

no outgoing calls