MCPcopy Index your code
hub / github.com/python/cpython / after_command

Method after_command

Lib/_pyrepl/readline.py:197–211  ·  view source on GitHub ↗
(self, cmd: Command)

Source from the content-addressed store, hash-verified

195 )
196
197 def after_command(self, cmd: Command) -> None:
198 super().after_command(cmd)
199 if self.more_lines is None:
200 # Force single-line input if we are in raw_input() mode.
201 # Although there is no direct way to add a \n in this mode,
202 # multiline buffers can still show up using various
203 # commands, e.g. navigating the history.
204 try:
205 index = self.buffer.index("\n")
206 except ValueError:
207 pass
208 else:
209 self.buffer = self.buffer[:index]
210 if self.pos > len(self.buffer):
211 self.pos = len(self.buffer)
212
213
214def set_auto_history(_should_auto_add_history: bool) -> None:

Callers

nothing calls this directly

Calls 2

superClass · 0.85
indexMethod · 0.45

Tested by

no test coverage detected