do not validate 'warnings' in make_dict
This commit is contained in:
@ -181,7 +181,7 @@ class ConfigBag:
|
||||
return 'validator' in self._setting_properties
|
||||
return self._validate
|
||||
if key == 'setting_properties':
|
||||
if self.force_unrestraint:
|
||||
if self.force_unrestraint or not self._validate:
|
||||
return None
|
||||
return self._setting_properties
|
||||
if key == '_setting_properties':
|
||||
@ -195,10 +195,6 @@ class ConfigBag:
|
||||
|
||||
def __setattr__(self, key, value):
|
||||
if key == 'validate':
|
||||
try:
|
||||
del self._setting_properties
|
||||
except AttributeError:
|
||||
pass
|
||||
self._validate = value
|
||||
else:
|
||||
super().__setattr__(key, value)
|
||||
@ -208,8 +204,11 @@ class ConfigBag:
|
||||
for key in self.__slots__:
|
||||
if key == 'fromconsistency' and self.fromconsistency != []:
|
||||
kwargs['fromconsistency'] = copy(self.fromconsistency)
|
||||
value = getattr(self, key)
|
||||
if key == '_validate' and value == True:
|
||||
pass
|
||||
else:
|
||||
kwargs[key] = getattr(self, key)
|
||||
kwargs[key] = value
|
||||
return ConfigBag(**kwargs)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user