From fee8997f1371d2ae18b700950c8aa3cc2e4e6a8c Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Sat, 17 Nov 2018 23:14:47 +0100 Subject: [PATCH] use remove_warnings --- tiramisu/api.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tiramisu/api.py b/tiramisu/api.py index b4cdbc2..aee2aaf 100644 --- a/tiramisu/api.py +++ b/tiramisu/api.py @@ -504,7 +504,7 @@ class _TiramisuOptionValueOptionDescription: config_bag = self._option_bag.config_bag if config_bag.properties and 'warnings' in config_bag.properties: config_bag = config_bag.copy() - config_bag.properties = config_bag.properties - {'warnings'} + config_bag.remove_warnings() return subconfig.make_dict(config_bag=config_bag, flatten=flatten, fullpath=fullpath, @@ -810,11 +810,10 @@ class TiramisuContextValue(TiramisuContext): withoption=None, fullpath=False): """Dict with path as key and value""" - if not self._config_bag.properties: - config_bag = self._config_bag - else: + config_bag = self._config_bag + if config_bag.properties and 'warnings' in config_bag.properties: config_bag = self._config_bag.copy() - config_bag.properties = self._config_bag.properties - {'warnings'} + config_bag.remove_warnings() return config_bag.context.make_dict(config_bag, flatten=flatten, fullpath=fullpath, @@ -1063,7 +1062,7 @@ class TiramisuContextOption(TiramisuContext): config_bag = self._config_bag if config_bag.properties and 'warnings' in config_bag.properties: config_bag = config_bag.copy() - config_bag.properties = config_bag.properties - {'warnings'} + config_bag.remove_warnings() option = config_bag.context.cfgimpl_get_description() for toption in self._walk(option, recursive,