MCPcopy Index your code
hub / github.com/ipython/ipython / ip2py

Method ip2py

IPython/testing/plugin/ipdoctest.py:127–133  ·  view source on GitHub ↗

Convert input IPython source into valid Python.

(self,source)

Source from the content-addressed store, hash-verified

125 _RANDOM_TEST = re.compile(r'#\s*all-random\s+')
126
127 def ip2py(self,source):
128 """Convert input IPython source into valid Python."""
129 block = _ip.input_transformer_manager.transform_cell(source)
130 if len(block.splitlines()) == 1:
131 return _ip.prefilter(block)
132 else:
133 return block
134
135 def parse(self, string, name='<string>'):
136 """

Callers 1

_parse_exampleMethod · 0.95

Calls 1

transform_cellMethod · 0.45

Tested by

no test coverage detected