-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Labels
F: commentsThe syntactic kind. Not in the language grammar, always on our minds. Best bugs.The syntactic kind. Not in the language grammar, always on our minds. Best bugs.F: empty linesWasting vertical space efficiently.Wasting vertical space efficiently.T: enhancementNew feature or requestNew feature or request
Description
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.py
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
$ cat 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
$ cat test3.py
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
blfpd, tommyjcarpenter, vamega, fidgetingbits, DetachHead and 3 more
Metadata
Metadata
Assignees
Labels
F: commentsThe syntactic kind. Not in the language grammar, always on our minds. Best bugs.The syntactic kind. Not in the language grammar, always on our minds. Best bugs.F: empty linesWasting vertical space efficiently.Wasting vertical space efficiently.T: enhancementNew feature or requestNew feature or request