MCPcopy Create free account
hub / github.com/CompVis/diff2flow / get_obj_from_str

Function get_obj_from_str

diff2flow/helpers.py:12–17  ·  view source on GitHub ↗
(string, reload=False)

Source from the content-addressed store, hash-verified

10
11
12def get_obj_from_str(string, reload=False):
13 module, cls = string.rsplit(".", 1)
14 if reload:
15 module_imp = importlib.import_module(module)
16 importlib.reload(module_imp)
17 return getattr(importlib.import_module(module, package=None), cls)
18
19
20def instantiate_from_config(config):

Callers 2

instantiate_from_configFunction · 0.85
load_partial_from_configFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected