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

Function format_docstring

docs/autogen_magics.py:17–23  ·  view source on GitHub ↗
(func)

Source from the content-addressed store, hash-verified

15 return line
16
17def format_docstring(func):
18 docstring = (func.__doc__ or "Undocumented").rstrip()
19 docstring = indent(dedent(docstring))
20 # Sphinx complains if indented bits have rst headings in, so strip out
21 # any underlines in the docstring.
22 lines = [_strip_underline(l) for l in docstring.splitlines()]
23 return "\n".join(lines)
24
25output = [
26"Line magics",

Callers 1

autogen_magics.pyFile · 0.85

Calls 3

indentFunction · 0.90
dedentFunction · 0.90
_strip_underlineFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…