(string, reload=False, invalidate_cache=True)
| 262 | |
| 263 | |
| 264 | def get_obj_from_str(string, reload=False, invalidate_cache=True): |
| 265 | module, cls = string.rsplit(".", 1) |
| 266 | if invalidate_cache: |
| 267 | importlib.invalidate_caches() |
| 268 | if reload: |
| 269 | module_imp = importlib.import_module(module) |
| 270 | importlib.reload(module_imp) |
| 271 | return getattr(importlib.import_module(module, package=None), cls) |
| 272 | |
| 273 | |
| 274 | def append_zero(x): |
no outgoing calls
no test coverage detected