Source

wheezy.validation / src / wheezy / validation / model.py

Diff from to

File src/wheezy/validation/model.py

     else:
         attribute_names = list(model.__dict__)
         attribute_names.extend([name for name in model.__class__.__dict__
-                                    if name[:1] != '_'])
+                                if name[:1] != '_'])
         getter = getattr
         setter = setattr
     succeed = True
                 attr[:] = items
             except (ArithmeticError, ValueError):
                 results[name] = [gettext(
-                        "Multiple input was not in a correct format.")]
+                    "Multiple input was not in a correct format.")]
                 succeed = False
         else:  # A simple value attribute
             provider_name = type(attr).__name__
                     setter(model, name, value)
                 except (ArithmeticError, ValueError):
                     results[name] = [gettext(
-                            "Input was not in a correct format.")]
+                        "Input was not in a correct format.")]
                     succeed = False
     return succeed
 
 
 
 value_providers = {
-        'str': lambda str_value, gettext: str_value.strip(),
-        'unicode': lambda str_value, gettext: \
-                str_value.strip().decode('UTF-8'),
-        'int': int_value_provider,
-        'Decimal': decimal_value_provider,
-        'bool': bool_value_provider,
-        'float': float_value_provider,
-        'date': date_value_provider,
-        'time': time_value_provider,
-        'datetime': datetime_value_provider
+    'str': lambda str_value, gettext: str_value.strip(),
+    'unicode': lambda str_value, gettext: str_value.strip().decode('UTF-8'),
+    'int': int_value_provider,
+    'Decimal': decimal_value_provider,
+    'bool': bool_value_provider,
+    'float': float_value_provider,
+    'date': date_value_provider,
+    'time': time_value_provider,
+    'datetime': datetime_value_provider
 }