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

Function setup

docs/sphinxext/magics.py:38–46  ·  view source on GitHub ↗
(app)

Source from the content-addressed store, hash-verified

36 prefix = "%%"
37
38def setup(app):
39 app.add_object_type('magic', 'magic', 'pair: %s; magic command', parse_magic)
40 app.add_role_to_domain('std', 'magic', LineMagicRole(), override=True)
41
42 app.add_object_type('cellmagic', 'cellmagic', 'pair: %s; cell magic', parse_cell_magic)
43 app.add_role_to_domain('std', 'cellmagic', CellMagicRole(), override=True)
44
45 metadata = {'parallel_read_safe': True, 'parallel_write_safe': True}
46 return metadata

Callers

nothing calls this directly

Calls 2

LineMagicRoleClass · 0.85
CellMagicRoleClass · 0.85

Tested by

no test coverage detected