Plugins/CheckerPlugins/CodeStyleChecker/pycodestyle.py

changeset 5303
83ab5275f255
parent 5290
174dae2b91c3
child 5389
9b1c800daff3
--- a/Plugins/CheckerPlugins/CodeStyleChecker/pycodestyle.py	Mon Nov 07 19:22:23 2016 +0100
+++ b/Plugins/CheckerPlugins/CodeStyleChecker/pycodestyle.py	Mon Nov 07 22:26:01 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
 

eric ide

mercurial