diff --git a/tiramisu/api.py b/tiramisu/api.py index 92e6a4a..289a7d4 100644 --- a/tiramisu/api.py +++ b/tiramisu/api.py @@ -582,13 +582,16 @@ class TiramisuOptionValue(CommonTiramisuOption): @option_type('optiondescription') def dict(self, options_bag: List[OptionBag]): - """Dict with path as key and value""" + """Obsolete: dict with path as key and value""" return self._config_bag.context.make_dict(options_bag[-1]) - @option_type(['option', 'symlink', 'with_index']) + @option_type(['option', 'symlink', 'with_index', 'optiondescription']) def get(self, options_bag: List[OptionBag], ): + """Get value""" + if options_bag[-1].option.impl_is_optiondescription(): + return self._config_bag.context.make_dict(options_bag[-1]) return self._get(options_bag) def _get(self, @@ -947,6 +950,14 @@ class TiramisuContextValue(TiramisuConfig): ) def dict(self): + """Obsolete: dict with path as key and value""" + option_bag = OptionBag(self._config_bag.context.get_description(), + None, + self._config_bag, + ) + return self._config_bag.context.make_dict(option_bag) + + def get(self): """Dict with path as key and value""" option_bag = OptionBag(self._config_bag.context.get_description(), None,