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

Function add_submodule

IPython/lib/deepreload.py:193–203  ·  view source on GitHub ↗

mod.{subname} = submod

(mod, submod, fullname, subname)

Source from the content-addressed store, hash-verified

191 return m
192
193def add_submodule(mod, submod, fullname, subname):
194 """mod.{subname} = submod"""
195 if mod is None:
196 return #Nothing to do here.
197
198 if submod is None:
199 submod = sys.modules[fullname]
200
201 setattr(mod, subname, submod)
202
203 return
204
205def ensure_fromlist(mod, fromlist, buf, recursive):
206 """Handle 'from module import a, b, c' imports."""

Callers 1

import_submoduleFunction · 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…