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

Method load

bpython/history.py:195–198  ·  view source on GitHub ↗
(self, filename: Path, encoding: str)

Source from the content-addressed store, hash-verified

193 self.saved_line = ""
194
195 def load(self, filename: Path, encoding: str) -> None:
196 with open(filename, encoding=encoding, errors="ignore") as hfile:
197 with FileLock(hfile, filename=str(filename)):
198 self.entries = self.load_from(hfile)
199
200 def load_from(self, fd: TextIO) -> list[str]:
201 entries: list[str] = []

Callers 3

test_loadMethod · 0.95
test_saveMethod · 0.95
__init__Method · 0.80

Calls 2

load_fromMethod · 0.95
FileLockFunction · 0.85

Tested by 2

test_loadMethod · 0.76
test_saveMethod · 0.76