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

Function is_possible_submodule

IPython/core/completerlib.py:166–175  ·  view source on GitHub ↗
(module, attr)

Source from the content-addressed store, hash-verified

164 return not(attr[:2] == '__' and attr[-2:] == '__')
165
166def is_possible_submodule(module, attr):
167 try:
168 obj = getattr(module, attr)
169 except AttributeError:
170 # Is possibly an unimported submodule
171 return True
172 except TypeError:
173 # https://github.com/ipython/ipython/issues/9678
174 return False
175 return inspect.ismodule(obj)
176
177
178def try_import(mod: str, only_modules=False) -> List[str]:

Callers 1

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