@@ -195,16 +195,16 @@ def _validate_enum_value(field_name, value, enum_value):
195195 if isinstance (enum_value , list ):
196196 if value not in enum_value :
197197 raise ValueError (
198- "Invalid value %s assigned " " to field %s" % (value , field_name )
198+ "Invalid value %s assigned to field %s" % (value , field_name )
199199 )
200200 elif isinstance (enum_value , str ):
201201 if not value == enum_value :
202202 raise ValueError (
203- "Invalid value %s assigned " " to field %s" % (value , field_name )
203+ "Invalid value %s assigned to field %s" % (value , field_name )
204204 )
205205 else :
206206 raise TypeError (
207- "Value of enum should " " be either a string or list of strings.\n "
207+ "Value of enum should be either a string or list of strings.\n "
208208 )
209209
210210 def _validate_type (field_name , value , opt ):
@@ -234,14 +234,12 @@ def _validate_min_max_value(field_name, value, opt):
234234 if isinstance (value , (int , float )):
235235 if value < opt ["minValue" ] or value > opt ["maxValue" ]:
236236 raise ValueError (
237- "Invalid value %s assigned "
238- "to field %s.\n " % (value , field_name )
237+ "Invalid value %s assigned to field %s.\n " % (value , field_name )
239238 )
240239 elif isinstance (value , str ):
241240 if len (value ) < opt ["minValue" ] or len (value ) > opt ["maxValue" ]:
242241 raise ValueError (
243- "Invalid value %s assigned "
244- "to field %s.\n " % (value , field_name )
242+ "Invalid value %s assigned to field %s.\n " % (value , field_name )
245243 )
246244
247245 if isinstance (value , dict ):
@@ -622,7 +620,7 @@ def set(self, **kvargs):
622620 """
623621 if self ._is_field_set :
624622 raise RuntimeError (
625- "Field value is changed, append() " " must be called before set()"
623+ "Field value is changed, append() must be called before set()"
626624 )
627625
628626 self .lock ()
@@ -698,7 +696,7 @@ def load(self, **kvargs):
698696 """
699697 if self ._is_field_set :
700698 raise RuntimeError (
701- "Field value is changed, append() " " must be called before load()"
699+ "Field value is changed, append() must be called before load()"
702700 )
703701
704702 # pass up to config class load() api, with xml object as vargs[0].
0 commit comments