(string: str, reload: bool = False)
| 13 | |
| 14 | |
| 15 | def get_obj_from_str(string: str, reload: bool = False) -> Any: |
| 16 | module, cls = string.rsplit(".", 1) |
| 17 | if reload: |
| 18 | module_imp = importlib.import_module(module) |
| 19 | importlib.reload(module_imp) |
| 20 | return getattr(importlib.import_module(module, package=None), cls) |
| 21 | |
| 22 | |
| 23 | def instantiate_from_config(config: Mapping[str, Any]) -> Any: |
no outgoing calls
no test coverage detected