Exemplo n.º 1
0
 def _f(*object_to_check):
     log.info('{}, args: {}'.format(f_object, *object_to_check))
     # This part of function need for check input parameter that to ensure the safe execution of the function
     for index, argument in enumerate(inspect.getfullargspec(f_object)[0]):
         if not isinstance(object_to_check[index],
                           f_object.__annotations__[argument]):
             raise Exceptions.FailCheckStr(
                 'object_to_check <{}> must be <str> type'.format(
                     *object_to_check))
     log.info('Function: {}, Status: OK'.format(f_object.__name__))
     return f_object(*object_to_check)