| Total Complexity | 2 |
| Total Lines | 10 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | import importlib |
||
| 5 | class ActionWrapper(Action): |
||
| 6 | def __init__(self, config): |
||
| 7 | self.config = config |
||
| 8 | |||
| 9 | def run(self, **kwargs): |
||
| 10 | cls_name = kwargs.pop("cls") |
||
| 11 | module_path = kwargs.pop("module_path") |
||
| 12 | module = importlib.import_module(module_path) |
||
| 13 | cls = getattr(module, cls_name)(self.config) |
||
| 14 | return cls.run(**kwargs) |
||
| 15 |