From ced9857a536569f305641d0dc28a5b1945d73d26 Mon Sep 17 00:00:00 2001 From: Felix Soubelet Date: Fri, 9 Aug 2024 15:16:18 +0200 Subject: [PATCH] membership test should be 'not in' --- generic_parser/dict_parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generic_parser/dict_parser.py b/generic_parser/dict_parser.py index ef5b94f..496e577 100644 --- a/generic_parser/dict_parser.py +++ b/generic_parser/dict_parser.py @@ -160,7 +160,7 @@ def _parse_arguments(self, arg_dict, param_dict): checked_dict[key] = DictParser._check_value(key, arg_dict, param_dict) elif isinstance(param_dict[key], dict): try: - if not arg_dict or not (key in arg_dict): + if not arg_dict or key not in arg_dict: checked_dict[key] = self._parse_arguments({}, param_dict[key])[0] else: checked_dict[key] = self._parse_arguments(arg_dict[key], param_dict[key])[0]