pycodestyle
pycodestyle copied to clipboard
E741: Inconsistent behavior for lambdas
It seems like E741 shouldn't apply to variable names inside of comprehensions, due to the limited scope of such variables. If that's the desired behavior anyways, this behavior seems inconsistent to me:
# flagged as lint
foo = [l for l in lines if l]
# not flagged as lint
foo = list(filter(lambda l: l, lines))