wistful / SublimeAutoPEP8

Automatically formats Python code to conform to the PEP 8 style guide using autopep8 and pep8 modules
144 stars 23 forks source link

E305 expected 2 blank lines after class or function definition #58

Closed brupelo closed 5 years ago

brupelo commented 6 years ago

Try running your plugin with the below file:

def foo():
    print('foo')

if __name__ == "__main__":
    a = 1 + 1
    print('bar')

For some reason you'll still get the next error x.py:4:1: E305 expected 2 blank lines after class or function definition, found 1 when checking with flake8.

Any idea why autopep8 isn't adding 2 blank lines after 2nd line print('foo')?

NS: When trying manually running autopep8 1.3.4 (pycodestyle: 2.3.1) on that file it will work ok though.

Thanks.

wistful commented 5 years ago

Not reproducible.