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

Function _make_help_call

IPython/core/inputtransformer2.py:432–442  ·  view source on GitHub ↗

Prepares a pinfo(2)/psearch call from a target name and the escape (i.e. ? or ??)

(target, esc)

Source from the content-addressed store, hash-verified

430ESCAPE_DOUBLES = {'!!', '??'} # %% (cell magic) is handled separately
431
432def _make_help_call(target, esc):
433 """Prepares a pinfo(2)/psearch call from a target name and the escape
434 (i.e. ? or ??)"""
435 method = 'pinfo2' if esc == '??' \
436 else 'psearch' if '*' in target \
437 else 'pinfo'
438 arg = " ".join([method, target])
439 #Prepare arguments for get_ipython().run_line_magic(magic_name, magic_args)
440 t_magic_name, _, t_magic_arg_s = arg.partition(' ')
441 t_magic_name = t_magic_name.lstrip(ESC_MAGIC)
442 return "get_ipython().run_line_magic(%r, %r)" % (t_magic_name, t_magic_arg_s)
443
444
445def _tr_help(content):

Callers 3

_tr_helpFunction · 0.85
_tr_help2Function · 0.85
transformMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…