diff options
author | Ian Cordasco <sigmavirus24@users.noreply.github.com> | 2016-11-07 07:40:26 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-07 07:40:26 -0600 |
commit | e5411e15e7fb919c3bdcc08e37e9d4134e255ed3 (patch) | |
tree | 0f184e1370496637ff1e0e370f9db958fe69777e | |
parent | d12e2ea39745bd3bb9e819d7342e4c1d73dbb008 (diff) | |
parent | ce71d1ed68550cd1240ba948ecf2d0ae760bc2ff (diff) | |
download | pep8-e5411e15e7fb919c3bdcc08e37e9d4134e255ed3.tar.gz |
Merge pull request #593 from markpeek/markpeek-E305fix
Fix E305 regression in 2.1.0 due to fix for #400
-rwxr-xr-x | pycodestyle.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pycodestyle.py b/pycodestyle.py index 966e723..3d1125e 100755 --- a/pycodestyle.py +++ b/pycodestyle.py @@ -254,6 +254,8 @@ def blank_lines(logical_line, blank_lines, indent_level, line_number, Okay: def a():\n pass\n\n\ndef b():\n pass Okay: def a():\n pass\n\n\nasync def b():\n pass Okay: def a():\n pass\n\n\n# Foo\n# Bar\n\ndef b():\n pass + Okay: default = 1\nfoo = 1 + Okay: classify = 1\nfoo = 1 E301: class Foo:\n b = 0\n def bar():\n pass 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, elif blank_before != 2: yield 0, "E302 expected 2 blank lines, found %d" % blank_before elif (logical_line and not indent_level and blank_before != 2 and - previous_unindented_logical_line.startswith(('def', 'class'))): + previous_unindented_logical_line.startswith(('def ', 'class '))): yield 0, "E305 expected 2 blank lines after " \ "class or function definition, found %d" % blank_before |