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

Method insert_into_history

bpython/repl.py:1009–1015  ·  view source on GitHub ↗
(self, s: str)

Source from the content-addressed store, hash-verified

1007 return more
1008
1009 def insert_into_history(self, s: str):
1010 try:
1011 self.rl_history.append_reload_and_write(
1012 s, self.config.hist_file, getpreferredencoding()
1013 )
1014 except RuntimeError as e:
1015 self.interact.notify(f"{e}")
1016
1017 def prompt_undo(self) -> int:
1018 """Returns how many lines to undo, 0 means don't undo"""

Callers 2

pushMethod · 0.95
pushMethod · 0.80

Calls 3

getpreferredencodingFunction · 0.85
notifyMethod · 0.45

Tested by

no test coverage detected