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

Method _store

IPython/core/inputsplitter.py:514–527  ·  view source on GitHub ↗

Store one or more lines of input. If input lines are not newline-terminated, a newline is automatically appended.

(self, lines, buffer=None, store='source')

Source from the content-addressed store, hash-verified

512 indent_spaces = property(get_indent_spaces)
513
514 def _store(self, lines, buffer=None, store='source'):
515 """Store one or more lines of input.
516
517 If input lines are not newline-terminated, a newline is automatically
518 appended."""
519
520 if buffer is None:
521 buffer = self._buffer
522
523 if lines.endswith('\n'):
524 buffer.append(lines)
525 else:
526 buffer.append(lines+'\n')
527 setattr(self, store, self._set_source(buffer))
528
529 def _set_source(self, buffer):
530 return u''.join(buffer)

Callers 4

pushMethod · 0.95
flush_transformersMethod · 0.80
pushMethod · 0.80
test_sourceMethod · 0.80

Calls 1

_set_sourceMethod · 0.95

Tested by 1

test_sourceMethod · 0.64