From b4c4d18e9f49197767316cdecce169ac3489802b Mon Sep 17 00:00:00 2001 From: stv Date: Mon, 17 Nov 2014 15:27:59 -0500 Subject: [PATCH] Fix Pylint: W0110: (deprecated-lambda) divide_chemical_expression: map/filter on lambda could be replaced by comprehension --- common/lib/chem/chem/chemcalc.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/common/lib/chem/chem/chemcalc.py b/common/lib/chem/chem/chemcalc.py index 27ce78b3f7..119b558fe4 100644 --- a/common/lib/chem/chem/chemcalc.py +++ b/common/lib/chem/chem/chemcalc.py @@ -340,11 +340,10 @@ def divide_chemical_expression(s1, s2, ignore_state=False): return False if any( - map( - lambda x, y: x / y - treedic['1 factors'][0] / treedic['2 factors'][0], - treedic['1 factors'], - treedic['2 factors'], - ) + [ + x / y - treedic['1 factors'][0] / treedic['2 factors'][0] + for (x, y) in zip(treedic['1 factors'], treedic['2 factors']) + ] ): # factors are not proportional return False