Skip to content

Commit e5411e1

Browse files
authored
Merge pull request #593 from markpeek/markpeek-E305fix
Fix E305 regression in 2.1.0 due to fix for #400
2 parents d12e2ea + ce71d1e commit e5411e1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pycodestyle.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,8 @@ def blank_lines(logical_line, blank_lines, indent_level, line_number,
254254
Okay: def a():\n pass\n\n\ndef b():\n pass
255255
Okay: def a():\n pass\n\n\nasync def b():\n pass
256256
Okay: def a():\n pass\n\n\n# Foo\n# Bar\n\ndef b():\n pass
257+
Okay: default = 1\nfoo = 1
258+
Okay: classify = 1\nfoo = 1
257259
258260
E301: class Foo:\n b = 0\n def bar():\n pass
259261
E302: def a():\n pass\n\ndef b(n):\n pass
@@ -291,7 +293,7 @@ def blank_lines(logical_line, blank_lines, indent_level, line_number,
291293
elif blank_before != 2:
292294
yield 0, "E302 expected 2 blank lines, found %d" % blank_before
293295
elif (logical_line and not indent_level and blank_before != 2 and
294-
previous_unindented_logical_line.startswith(('def', 'class'))):
296+
previous_unindented_logical_line.startswith(('def ', 'class '))):
295297
yield 0, "E305 expected 2 blank lines after " \
296298
"class or function definition, found %d" % blank_before
297299

0 commit comments

Comments
 (0)