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

Function _safe_isinstance

IPython/core/completer.py:882–886  ·  view source on GitHub ↗

Checks if obj is an instance of module.class_name if loaded

(obj, module, class_name)

Source from the content-addressed store, hash-verified

880
881
882def _safe_isinstance(obj, module, class_name):
883 """Checks if obj is an instance of module.class_name if loaded
884 """
885 return (module in sys.modules and
886 isinstance(obj, getattr(import_module(module), class_name)))
887
888
889def back_unicode_name_matches(text):

Callers 1

get_keysMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected