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

Function pickle_get_current_class

IPython/extensions/tests/test_autoreload.py:128–137  ·  view source on GitHub ↗

Original issue comes from pickle; hence the name.

(obj)

Source from the content-addressed store, hash-verified

126#-----------------------------------------------------------------------------
127
128def pickle_get_current_class(obj):
129 """
130 Original issue comes from pickle; hence the name.
131 """
132 name = obj.__class__.__name__
133 module_name = getattr(obj, "__module__", None)
134 obj2 = sys.modules[module_name]
135 for subpath in name.split("."):
136 obj2 = getattr(obj2, subpath)
137 return obj2
138
139class TestAutoreload(Fixture):
140

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected