pycodestyle icon indicating copy to clipboard operation
pycodestyle copied to clipboard

E301: reported incorrectly after ignored E303

Open SukiCZ opened this issue 5 years ago • 1 comments

Hello, :wave:

I have a following code in foo.py:

     1	class FooBar:
     2	
     3	    def foo(self):
     4	        pass
     5	
     6	
     7	    # Comment
     8	
     9	    def bar(self):
    10	        pass


and running pycodestyle --ignore=E303 foo.py (E303 - Too many blank lines) reports foo.py:9:5: E301 expected 1 blank line, found 0 even there is a blank line.

There is one more thing that is confusing me - I'm able to fix this error by adding new line between def bar and pass.

Any idea what could be wrong here? Thanks

SukiCZ avatar Apr 20 '20 11:04 SukiCZ