Tue, 08 Nov 2016 19:00:07 +0100
Merged with changes done by Tobias.
--- a/Plugins/CheckerPlugins/CodeStyleChecker/pycodestyle.py Tue Nov 08 18:57:54 2016 +0100 +++ b/Plugins/CheckerPlugins/CodeStyleChecker/pycodestyle.py Tue Nov 08 19:00:07 2016 +0100 @@ -268,6 +268,8 @@ 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 @@ -305,7 +307,7 @@ 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