pycodestyle icon indicating copy to clipboard operation
pycodestyle copied to clipboard

Allow spaces before lambda.

Open anntzer opened this issue 6 years ago • 14 comments

Currently, pycodestyle allows

{
    "key":        1,
    "longer-key": 2,
}

(actually it emits a E241 "multiple spaces after ":", but that's suppressed by default) but disallows

{
    "key":        lambda: 1,
    "longer-key": lambda: 2,
}

because the first entry has "multiple spaces before keyword" (before the lambda), even though the cases are clearly similar.

Fix that by excluding lambda from that check.

anntzer avatar Jun 11 '19 09:06 anntzer