Avoid unnecessarily wrapping a function in a lambda
Avoid defining a lambda function which passes through of it is arguments to another callable. You can instead safely directly call the callable.
If our GitHub code review bot spots this issue in your pull request it gives this advice:
1 | + | foo = lambda x: bar(x) |
Avoid unnecessarily wrapping a function in a lambda
Read more- | foo = lambda x: bar(x) |
+ | foo = bar |