Coverage for mindsdb / integrations / libs / ml_handler_process / func_call_process.py: 17%

14 statements  

« prev     ^ index     » next       coverage.py v7.13.1, created at 2026-01-21 00:36 +0000

1import importlib 

2 

3from mindsdb.interfaces.storage.model_fs import HandlerStorage 

4 

5 

6def func_call_process(name: str, args: dict, integration_id: int, module_path: str) -> None: 

7 module = importlib.import_module(module_path) 

8 

9 if module.import_error is not None: 

10 raise module.import_error 

11 

12 result = None 

13 

14 if hasattr(module.Handler, "function_call"): 

15 engine_storage = HandlerStorage(integration_id) 

16 try: 

17 result = module.Handler(engine_storage=engine_storage, model_storage=None).function_call(name, args) 

18 except NotImplementedError: 

19 return None 

20 

21 return result