result_check#
- maize.utilities.chem.chem.result_check(func: Callable[[_P], _T], none_check: bool = True, false_check: bool = False) Callable[[_P], _T] [source]#
Calls an RDKit or Openbabel function and raises an exception if something goes wrong, instead of just returning
None
.- Parameters:
func – The function to wrap
none_check – Whether to check for a
None
return valuefalse_check – Whether to check for a
False
return value
- Returns:
The wrapped function
- Return type:
Callable[_P, _T]