MCPcopy Index your code
hub / github.com/bpython/bpython / load_from

Method load_from

bpython/history.py:200–204  ·  view source on GitHub ↗
(self, fd: TextIO)

Source from the content-addressed store, hash-verified

198 self.entries = self.load_from(hfile)
199
200 def load_from(self, fd: TextIO) -> list[str]:
201 entries: list[str] = []
202 for line in fd:
203 self.append_to(entries, line)
204 return entries if len(entries) else [""]
205
206 def save(self, filename: Path, encoding: str, lines: int = 0) -> None:
207 fd = os.open(

Callers 2

loadMethod · 0.95

Calls 1

append_toMethod · 0.95

Tested by

no test coverage detected