(string, reload=False)
| 19 | |
| 20 | |
| 21 | def get_obj_from_str(string, reload=False): |
| 22 | module, cls = string.rsplit(".", 1) |
| 23 | if reload: |
| 24 | module_imp = importlib.import_module(module) |
| 25 | importlib.reload(module_imp) |
| 26 | return getattr(importlib.import_module(module, package=None), cls) |
no outgoing calls
no test coverage detected