From 9a912376b94a7a51b87e44821993fa266db26a3d Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Sun, 23 Oct 2016 09:38:35 +0200 Subject: [PATCH] simplify apply_requires --- tiramisu/setting.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tiramisu/setting.py b/tiramisu/setting.py index 3427ee5..e14fc29 100644 --- a/tiramisu/setting.py +++ b/tiramisu/setting.py @@ -624,17 +624,20 @@ class Settings(object): :param path: the option's path in the config :type path: str """ - if opt.impl_getrequires() == []: - return frozenset() + current_requires = opt.impl_getrequires() # filters the callbacks if debug: calc_properties = {} else: calc_properties = set() + + if not current_requires: + return calc_properties + context = self._getcontext() all_properties = None - for requires in opt.impl_getrequires(): + for requires in current_requires: for require in requires: option, expected, action, inverse, \ transitive, same_action = require