suppress get_consistencies() method
This commit is contained in:
parent
536eb27904
commit
89dca8d707
|
@ -20,7 +20,6 @@
|
||||||
# the rough pypy's guys: http://codespeak.net/svn/pypy/dist/pypy/config/
|
# the rough pypy's guys: http://codespeak.net/svn/pypy/dist/pypy/config/
|
||||||
# the whole pypy projet is under MIT licence
|
# the whole pypy projet is under MIT licence
|
||||||
# ____________________________________________________________
|
# ____________________________________________________________
|
||||||
#from inspect import getmembers, ismethod
|
|
||||||
from tiramisu.error import PropertiesOptionError, ConfigError
|
from tiramisu.error import PropertiesOptionError, ConfigError
|
||||||
from tiramisu.option import OptionDescription, Option, SymLinkOption, \
|
from tiramisu.option import OptionDescription, Option, SymLinkOption, \
|
||||||
BaseInformation
|
BaseInformation
|
||||||
|
@ -44,7 +43,7 @@ class SubConfig(BaseInformation):
|
||||||
# main option description
|
# main option description
|
||||||
if not isinstance(descr, OptionDescription):
|
if not isinstance(descr, OptionDescription):
|
||||||
raise ValueError(_('descr must be an optiondescription, not {0}'
|
raise ValueError(_('descr must be an optiondescription, not {0}'
|
||||||
'').format(type(descr)))
|
).format(type(descr)))
|
||||||
self._impl_descr = descr
|
self._impl_descr = descr
|
||||||
# sub option descriptions
|
# sub option descriptions
|
||||||
if not isinstance(context, SubConfig):
|
if not isinstance(context, SubConfig):
|
||||||
|
@ -55,9 +54,6 @@ class SubConfig(BaseInformation):
|
||||||
'settings')):
|
'settings')):
|
||||||
self.cfgimpl_get_context().cfgimpl_reset_cache(only_expired, only)
|
self.cfgimpl_get_context().cfgimpl_reset_cache(only_expired, only)
|
||||||
|
|
||||||
def cfgimpl_get_consistancies(self):
|
|
||||||
return self.cfgimpl_get_context().cfgimpl_get_description()._consistancies
|
|
||||||
|
|
||||||
def cfgimpl_get_home_by_path(self, path, force_permissive=False,
|
def cfgimpl_get_home_by_path(self, path, force_permissive=False,
|
||||||
force_properties=None):
|
force_properties=None):
|
||||||
""":returns: tuple (config, name)"""
|
""":returns: tuple (config, name)"""
|
||||||
|
@ -72,14 +68,14 @@ class SubConfig(BaseInformation):
|
||||||
return hash(self.cfgimpl_get_description().impl_getkey(self))
|
return hash(self.cfgimpl_get_description().impl_getkey(self))
|
||||||
|
|
||||||
def __eq__(self, other):
|
def __eq__(self, other):
|
||||||
"Config comparison"
|
"Config's comparison"
|
||||||
if not isinstance(other, Config):
|
if not isinstance(other, Config):
|
||||||
return False
|
return False
|
||||||
return self.cfgimpl_get_description().impl_getkey(self) == \
|
return self.cfgimpl_get_description().impl_getkey(self) == \
|
||||||
other.cfgimpl_get_description().impl_getkey(other)
|
other.cfgimpl_get_description().impl_getkey(other)
|
||||||
|
|
||||||
def __ne__(self, other):
|
def __ne__(self, other):
|
||||||
"Config comparison"
|
"Config's comparison"
|
||||||
if not isinstance(other, Config):
|
if not isinstance(other, Config):
|
||||||
return False
|
return False
|
||||||
return not self == other
|
return not self == other
|
||||||
|
@ -116,7 +112,6 @@ class SubConfig(BaseInformation):
|
||||||
:param group_type: if defined, is an instance of `groups.GroupType`
|
:param group_type: if defined, is an instance of `groups.GroupType`
|
||||||
or `groups.MasterGroupType` that lives in
|
or `groups.MasterGroupType` that lives in
|
||||||
`setting.groups`
|
`setting.groups`
|
||||||
|
|
||||||
"""
|
"""
|
||||||
if group_type is not None:
|
if group_type is not None:
|
||||||
if not isinstance(group_type, groups.GroupType):
|
if not isinstance(group_type, groups.GroupType):
|
||||||
|
@ -428,12 +423,17 @@ class ConfigCommon(SubConfig):
|
||||||
self.cfgimpl_get_description().impl_build_cache()
|
self.cfgimpl_get_description().impl_build_cache()
|
||||||
|
|
||||||
def read_only(self):
|
def read_only(self):
|
||||||
|
"read only is a global config's setting, see `settings.py`"
|
||||||
self.cfgimpl_get_settings().read_only()
|
self.cfgimpl_get_settings().read_only()
|
||||||
|
|
||||||
def read_write(self):
|
def read_write(self):
|
||||||
|
"read write is a global config's setting, see `settings.py`"
|
||||||
self.cfgimpl_get_settings().read_write()
|
self.cfgimpl_get_settings().read_write()
|
||||||
|
|
||||||
def getowner(self, path):
|
def getowner(self, path):
|
||||||
|
"""convenience method to retrieve an option's owner
|
||||||
|
from the config itself
|
||||||
|
"""
|
||||||
opt = self.cfgimpl_get_description().impl_get_opt_by_path(path)
|
opt = self.cfgimpl_get_description().impl_get_opt_by_path(path)
|
||||||
return self.cfgimpl_get_values().getowner(opt)
|
return self.cfgimpl_get_values().getowner(opt)
|
||||||
|
|
||||||
|
@ -510,6 +510,7 @@ class MetaConfig(ConfigCommon):
|
||||||
self._impl_meta = None
|
self._impl_meta = None
|
||||||
|
|
||||||
def cfgimpl_get_context(self):
|
def cfgimpl_get_context(self):
|
||||||
|
"a meta config is a config wich has a setting, that is itself"
|
||||||
return self
|
return self
|
||||||
|
|
||||||
def cfgimpl_reset_cache(self, only_expired=False, only=('values', 'settings')):
|
def cfgimpl_reset_cache(self, only_expired=False, only=('values', 'settings')):
|
||||||
|
|
Loading…
Reference in New Issue