Operating system: macOS High Sierra
Python version: 3.6.5
Black version: 18.5b0
pycodestyle version: 2.4.0
Does also happen on master: yes
Should Black insert a newline between these variables and the function?
pycodestyle complains about test.py but Black doesn't change it
from __future__ import print_function, unicode_literals
all_data = []
all_versions = set()
# Comment
def thing():
pass
$ pycodestyle test.py
test.py:7:1: E302 expected 2 blank lines, found 1
$ black test.py
/private/tmp/test.py already well formatted, good job.
Both pycodestyle and Black are fine with test2.py
from __future__ import print_function, unicode_literals
all_data = []
all_versions = set()
# Comment
def thing():
pass
$ pycodestyle test2.py
$ black test2.py
/private/tmp/test2.py already well formatted, good job.
Black reformats test3.py, with no comment
from __future__ import print_function, unicode_literals
all_data = []
all_versions = set()
def thing():
pass
$ pycodestyle test3.py
test3.py:6:1: E302 expected 2 blank lines, found 1
$ black test3.py
reformatted /private/tmp/test3.py
$ pycodestyle test3.py
$ cat test3.py
from __future__ import print_function, unicode_literals
all_data = []
all_versions = set()
def thing():
pass
Operating system: macOS High Sierra
Python version: 3.6.5
Black version: 18.5b0
pycodestyle version: 2.4.0
Does also happen on master: yes
Should Black insert a newline between these variables and the function?
pycodestyle complains about test.py but Black doesn't change it
$ cat test.pyBoth pycodestyle and Black are fine with test2.py
$ cat test2.pyBlack reformats test3.py, with no comment
$ cat test3.py