metaconfig
This commit is contained in:
@ -125,7 +125,6 @@ class ConfigBag(object):
|
||||
'ori_option',
|
||||
'properties',
|
||||
'validate',
|
||||
'validate_properties',
|
||||
'setting_properties',
|
||||
'force_permissive',
|
||||
'force_unrestraint',
|
||||
@ -136,8 +135,6 @@ class ConfigBag(object):
|
||||
def __init__(self, config, **kwargs):
|
||||
self.default = {'force_permissive': False,
|
||||
'force_unrestraint': False,
|
||||
'validate': True,
|
||||
'validate_properties': True,
|
||||
'display_warnings': True,
|
||||
'trusted_cached_properties': True,
|
||||
}
|
||||
@ -148,6 +145,8 @@ class ConfigBag(object):
|
||||
setattr(self, key, value)
|
||||
|
||||
def __getattr__(self, key):
|
||||
if key in ['validate', 'validate_properties']:
|
||||
return not self.force_unrestraint
|
||||
if key == 'setting_properties':
|
||||
if self.force_unrestraint:
|
||||
return None
|
||||
@ -364,8 +363,7 @@ class Settings(object):
|
||||
props = self._p_.getproperties(path,
|
||||
opt.impl_getproperties())
|
||||
else:
|
||||
props = meta.cfgimpl_get_settings().getproperties(opt,
|
||||
path,
|
||||
props = meta.cfgimpl_get_settings().getproperties(path,
|
||||
index,
|
||||
config_bag)
|
||||
props |= self.apply_requires(path,
|
||||
|
Reference in New Issue
Block a user