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

Method register_lazy

IPython/core/magic.py:454–470  ·  view source on GitHub ↗

Lazily register a magic via an extension. Parameters ---------- name : str Name of the magic you wish to register. fully_qualified_name : Fully qualified name of the module/submodule that should be loaded as an extensions

(self, name: str, fully_qualified_name: str)

Source from the content-addressed store, hash-verified

452 return docs
453
454 def register_lazy(self, name: str, fully_qualified_name: str) -> None:
455 """
456 Lazily register a magic via an extension.
457
458
459 Parameters
460 ----------
461 name : str
462 Name of the magic you wish to register.
463 fully_qualified_name :
464 Fully qualified name of the module/submodule that should be loaded
465 as an extensions when the magic is first called.
466 It is assumed that loading this extensions will register the given
467 magic.
468 """
469
470 self.lazy_magics[name] = fully_qualified_name
471
472 def register(self, *magic_objects: type[Magics] | Magics) -> None:
473 """Register one or more instances of Magics.

Callers 1

test_lazy_magicsFunction · 0.80

Calls

no outgoing calls

Tested by 1

test_lazy_magicsFunction · 0.64