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

Method _flush

IPython/core/inputsplitter.py:619–639  ·  view source on GitHub ↗

yield transformed lines always strings, never None transform: the current transform outs: an iterable of previously transformed inputs. Each may be multiline, which will be passed one line at a time to tr

(transform, outs)

Source from the content-addressed store, hash-verified

617
618 def flush_transformers(self):
619 def _flush(transform, outs):
620 """yield transformed lines
621
622 always strings, never None
623
624 transform: the current transform
625 outs: an iterable of previously transformed inputs.
626 Each may be multiline, which will be passed
627 one line at a time to transform.
628 """
629 for out in outs:
630 for line in out.splitlines():
631 # push one line at a time
632 tmp = transform.push(line)
633 if tmp is not None:
634 yield tmp
635
636 # reset the transform
637 tmp = transform.reset()
638 if tmp is not None:
639 yield tmp
640
641 out = []
642 for t in self.transforms_in_use:

Callers

nothing calls this directly

Calls 2

pushMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected