MCPcopy Create free account
hub / github.com/ipython/ipython / reset

Method reset

IPython/core/inputsplitter.py:602–616  ·  view source on GitHub ↗

Reset the input buffer and associated state.

(self)

Source from the content-addressed store, hash-verified

600 return t + [self.assemble_python_lines] + self.python_line_transforms
601
602 def reset(self):
603 """Reset the input buffer and associated state."""
604 super(IPythonInputSplitter, self).reset()
605 self._buffer_raw[:] = []
606 self.source_raw = ''
607 self.transformer_accumulating = False
608 self.within_python_line = False
609
610 for t in self.transforms:
611 try:
612 t.reset()
613 except SyntaxError:
614 # Nothing that calls reset() expects to handle transformer
615 # errors
616 pass
617
618 def flush_transformers(self):
619 def _flush(transform, outs):

Callers 3

raw_resetMethod · 0.95
source_resetMethod · 0.95
transform_cellMethod · 0.95

Calls 1

resetMethod · 0.45

Tested by

no test coverage detected