cfg: rename variable for clarity

This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2022-07-12 12:07:11 +02:00
parent d231aa7d0b
commit 6712419366

View file

@ -99,10 +99,10 @@ def evaluate(expr, nested=False):
if hasattr(expr, 'asList'): if hasattr(expr, 'asList'):
expr = expr.asList() # compat with pyparsing 2.7.x expr = expr.asList() # compat with pyparsing 2.7.x
match expr: match expr:
case ['cfg', expr] if not nested: case ['cfg', subexpr] if not nested:
return evaluate(expr, True) return evaluate(subexpr, True)
case ['not', expr] if nested: case ['not', subexpr] if nested:
return not evaluate(expr, True) return not evaluate(subexpr, True)
case ['all', *args] if nested: case ['all', *args] if nested:
return all(evaluate(arg, True) for arg in args) return all(evaluate(arg, True) for arg in args)
case ['any', *args] if nested: case ['any', *args] if nested: