示例#1
0
 def __init__(self, function):
     super().__init__(function)
     self.__converters = {bool: self.boolean_conversion}
     self._errors = ErrorMessage(
         'While calling {}:',
         "got arg '{name}' as '{value}' of type '{typename}' "
         "which cannot be converted to '{expectedtype}'",
         get_signature(function))
示例#2
0
 def __init__(self, function):
     super().__init__(function)
     self.__converters = {bool: self.boolean_conversion}
     self._errors = ErrorMessage(
         'While calling {}:',
         "got arg '{name}' as '{value}' of type '{typename}' "
         "which cannot be converted to '{expectedtype}'",
         get_signature(function))
示例#3
0
 def __init__(self, function):
     self._function = function
     functools.update_wrapper(self, function)
     self.__signature = inspect.signature(function)
     self._specs = inspect.getfullargspec(self._function)
     self._self = None
     self._errors = ErrorMessage(
         'While calling {}:',
         "parameter '{name}' had value '{value}' of type '{typename}'",
         get_signature(function))
示例#4
0
 def __init__(self, function):
     self._function = function
     functools.update_wrapper(self, function)
     self.__signature = inspect.signature(function)
     self._specs = inspect.getfullargspec(self._function)
     self._self = None
     self._errors = ErrorMessage(
         'While calling {}:',
         "parameter '{name}' had value '{value}' of type '{typename}'",
         get_signature(function))