-
Notifications
You must be signed in to change notification settings - Fork 751
Open
Description
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 and macserv
Activity
asottile commentedon 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!
[-]E301 reported incorrectly after ignored E303[/-][+]E301: reported incorrectly after ignored E303[/+]