From 68d4c1e559fef510e257b36d69fd907b16830efd Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 21 Sep 2017 11:54:45 -0400 Subject: [PATCH] flake8: disable E731: do not assign a lambda expression, use a def It has too many false positives. It was complaining about things like if this: fn = some_func else: fn = lambda x: ... Where obviously, "fn" can't be a def, and it would be silly to introduce some other name to use as the def, just to assign it to fn. --- setup.cfg | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/setup.cfg b/setup.cfg index b3adc59011db..edcf3c564e15 100644 --- a/setup.cfg +++ b/setup.cfg @@ -14,8 +14,10 @@ ignore = E305, # E401: multiple imports on one line E401, - # too many leading '#' for block comment + # E266: too many leading '#' for block comment E266, - # module level import not at top of file - E402 + # E402: module level import not at top of file + E402, + # E731: do not assign a lambda expression, use a def (too many false positives) + E731 max-line-length = 120