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

Function add_submodule

IPython/lib/deepreload.py:209–219  ·  view source on GitHub ↗

mod.{subname} = submod

(mod, submod, fullname, subname)

Source from the content-addressed store, hash-verified

207 return m
208
209def add_submodule(mod, submod, fullname, subname):
210 """mod.{subname} = submod"""
211 if mod is None:
212 return #Nothing to do here.
213
214 if submod is None:
215 submod = sys.modules[fullname]
216
217 setattr(mod, subname, submod)
218
219 return
220
221def ensure_fromlist(mod, fromlist, buf, recursive):
222 """Handle 'from module import a, b, c' imports."""

Callers 1

import_submoduleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected