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

Function help_end

IPython/core/inputtransformer.py:343–355  ·  view source on GitHub ↗

Translate lines with ?/?? at the end

(line)

Source from the content-addressed store, hash-verified

341
342@StatelessInputTransformer.wrap
343def help_end(line):
344 """Translate lines with ?/?? at the end"""
345 m = _help_end_re.search(line)
346 if m is None or ends_in_comment_or_string(line):
347 return line
348 target = m.group(1)
349 esc = m.group(3)
350 lspace = _initial_space_re.match(line).group(0)
351
352 # If we're mid-command, put it back on the next prompt for the user.
353 next_input = line.rstrip('?') if line.strip() != m.group(0) else None
354
355 return _make_help_call(target, esc, lspace, next_input)
356
357
358@CoroutineInputTransformer.wrap

Callers 1

__init__Method · 0.90

Calls 4

groupMethod · 0.80
_make_help_callFunction · 0.70
searchMethod · 0.45

Tested by

no test coverage detected