@@ -31,12 +31,10 @@ def validate(
3131 `include_field_name_in_message` If false, the field name will not be part of the formatted error message.
3232 """
3333
34- ledger = ErrorLedger (
35- default_object_data = {"validation_type" : validation_type }, logging = logging , validators = validators
36- )
34+ ledger = ErrorLedger (default_object_data = {"validation_type" : validation_type }, logging = logging , validators = validators )
3735
3836 def _process_validator_results (ret , level , object_data , obj ):
39- """Process the return of a user-supplied `validator`. Accepts lists, dicts, and strings."""
37+ """ Process the return of a user-supplied `validator`. Accepts lists, dicts, and strings. """
4038
4139 # The first object in the tuple is the one being validated
4240 if isinstance (obj , tuple ):
@@ -63,7 +61,7 @@ def _process_validator_results(ret, level, object_data, obj):
6361 else :
6462 verbose_name = field_name_mapper (real_obj , field_name )
6563 if verbose_name is None :
66- from . titlecase import titlecase
64+ from titlecase import titlecase
6765
6866 verbose_name = titlecase (" " .join (field_name .split ("_" )))
6967
@@ -87,7 +85,7 @@ def _process_validator_results(ret, level, object_data, obj):
8785 object_data_with_field ["field" ] = field_name
8886 verbose_name = field_name_mapper (real_obj , field_name )
8987 if verbose_name is None :
90- from . titlecase import titlecase
88+ from titlecase import titlecase
9189
9290 verbose_name = titlecase (" " .join (field_name .split ("_" )))
9391
0 commit comments