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

Method __call__

IPython/core/inputtransformer2.py:79–85  ·  view source on GitHub ↗
(self, lines)

Source from the content-addressed store, hash-verified

77 return [self.prompt_re.sub('', l, count=1) for l in lines]
78
79 def __call__(self, lines):
80 if not lines:
81 return lines
82 if self.initial_re.match(lines[0]) or \
83 (len(lines) > 1 and self.prompt_re.match(lines[1])):
84 return self._strip(lines)
85 return lines
86
87classic_prompt = PromptStripper(
88 prompt_re=re.compile(r'^(>>>|\.\.\.)( |$)'),

Callers

nothing calls this directly

Calls 1

_stripMethod · 0.95

Tested by

no test coverage detected