Fix Pylint: W0110: (deprecated-lambda)
divide_chemical_expression: map/filter on lambda could be replaced by comprehension
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user