diff --git a/pep8.py b/pep8.py index 6ec0ae75..f628c00a 100755 --- a/pep8.py +++ b/pep8.py @@ -128,7 +128,7 @@ def blank_lines(logical_line, blank_lines, indent_level, line_number) EXTRANEOUS_WHITESPACE_REGEX = re.compile(r'[[({] | []}),;:]') WHITESPACE_AROUND_NAMED_PARAMETER_REGEX = \ re.compile(r'[()]|\s=[^=]|[^=!<>]=\s') - +LAMBDA_REGEX = re.compile(r'\blambda\b') WHITESPACE = ' \t' @@ -661,7 +661,7 @@ def compound_statements(logical_line): before = line[:found] if (before.count('{') <= before.count('}') and # {'a': 1} (dict) before.count('[') <= before.count(']') and # [1:2] (slice) - not re.search(r'\blambda\b', before)): # lambda x: x + not LAMBDA_REGEX.search(before)): # lambda x: x return found, "E701 multiple statements on one line (colon)" found = line.find(';') if -1 < found: