Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

E301: reported incorrectly after ignored E303 #925

Open
SukiCZ opened this issue Apr 20, 2020 · 1 comment
Open

E301: reported incorrectly after ignored E303 #925

SukiCZ opened this issue Apr 20, 2020 · 1 comment

Comments

@SukiCZ
Copy link

SukiCZ commented Apr 20, 2020

Hello, 👋

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

@asottile
Copy link
Member

asottile commented Apr 20, 2020

can confirm this is a bug -- seems pycodestyle has been doing this for a while (checked back to 2.4 at least) -- thanks for the report!

@asottile asottile changed the title E301 reported incorrectly after ignored E303 E301: reported incorrectly after ignored E303 Jun 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants