MCPcopy Index your code
hub / github.com/RustPython/RustPython / after_command

Method after_command

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

Source from the content-addressed store, hash-verified

184 )
185
186 def after_command(self, cmd: Command) -> None:
187 super().after_command(cmd)
188 if self.more_lines is None:
189 # Force single-line input if we are in raw_input() mode.
190 # Although there is no direct way to add a \n in this mode,
191 # multiline buffers can still show up using various
192 # commands, e.g. navigating the history.
193 try:
194 index = self.buffer.index("\n")
195 except ValueError:
196 pass
197 else:
198 self.buffer = self.buffer[:index]
199 if self.pos > len(self.buffer):
200 self.pos = len(self.buffer)
201
202
203def set_auto_history(_should_auto_add_history: bool) -> None:

Callers

nothing calls this directly

Calls 3

superClass · 0.85
lenFunction · 0.85
indexMethod · 0.45

Tested by

no test coverage detected