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

Function format_docstring

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

Source from the content-addressed store, hash-verified

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