E731 do not assign a lambda expression, use a def
The recommendation in PEP-8 you are running into is: Always use a def statement instead of an assignment statement that binds a lambda expression directly to a name. Yes: def f(x): return 2*x No: f = lambda x: 2*x The first form means that the name of the resulting function object is specifically ‘f’ instead … Read more