MCPcopy Index your code
hub / github.com/RustPython/RustPython / load_tail

Method load_tail

Lib/modulefinder.py:240–253  ·  view source on GitHub ↗
(self, q, tail)

Source from the content-addressed store, hash-verified

238 raise ImportError("No module named " + qname)
239
240 def load_tail(self, q, tail):
241 self.msgin(4, "load_tail", q, tail)
242 m = q
243 while tail:
244 i = tail.find('.')
245 if i < 0: i = len(tail)
246 head, tail = tail[:i], tail[i+1:]
247 mname = "%s.%s" % (m.__name__, head)
248 m = self.import_module(head, mname, m)
249 if not m:
250 self.msgout(4, "raise ImportError: No module named", mname)
251 raise ImportError("No module named " + mname)
252 self.msgout(4, "load_tail ->", m)
253 return m
254
255 def ensure_fromlist(self, m, fromlist, recursive=0):
256 self.msg(4, "ensure_fromlist", m, fromlist, recursive)

Callers 1

import_hookMethod · 0.95

Calls 5

msginMethod · 0.95
import_moduleMethod · 0.95
msgoutMethod · 0.95
lenFunction · 0.85
findMethod · 0.45

Tested by

no test coverage detected