diff --git a/tiramisu/config.py b/tiramisu/config.py index b98b33f..d268787 100644 --- a/tiramisu/config.py +++ b/tiramisu/config.py @@ -38,8 +38,6 @@ class Config(object): _cfgimpl_frozen = True _cfgimpl_owner = default_owner _cfgimpl_toplevel = None -# TODO implement unicity by name -# _cfgimpl_unique_names = True def __init__(self, descr, parent=None, **overrides): self._cfgimpl_descr = descr @@ -63,26 +61,6 @@ class Config(object): else: raise ConflictConfigError('duplicate option name: ' '{0}'.format(dup._name)) - -# TODO implement unicity by name -# def _validate_duplicates_for_names(self, children): -# "validates duplicates names agains the whole config" -# rootconfig = self._cfgimpl_get_toplevel() -# if self._cfgimpl_unique_names: -# for dup in children: -# try: -# print dup._name -# try: -# print rootconfig.get(dup._name) -# except AttributeError: -# pass -# raise NotFoundError -# #rootconfig.get(dup._name) -# except NotFoundError: -# pass # no identical names, it's fine -# else: -# raise ConflictConfigError('duplicate option name: ' -# '{0}'.format(dup._name)) def _cfgimpl_build(self, overrides): self._validate_duplicates(self._cfgimpl_descr._children)