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

Function _temp_db

tests/test_manager.py:76–83  ·  view source on GitHub ↗

Yield a path to a fresh temp SQLite file, cleaned up on exit.

()

Source from the content-addressed store, hash-verified

74
75@contextlib.contextmanager
76def _temp_db():
77 """Yield a path to a fresh temp SQLite file, cleaned up on exit."""
78 fd, path = tempfile.mkstemp(suffix=".db")
79 os.close(fd)
80 try:
81 yield path
82 finally:
83 os.unlink(path)
84
85
86def _make_manpage_from_source(source: str) -> ParsedManpage:

Calls 1

closeMethod · 0.45

Tested by

no test coverage detected