(string, reload=False)
| 10 | |
| 11 | |
| 12 | def 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 | |
| 20 | def instantiate_from_config(config): |
no outgoing calls
no test coverage detected