Files
openide/python/testData/formatter/commentsSpacing.py
Mikhail Golubev e8d4286a58 PY-25356 Remove excess blank lines between line comments
The behavior of the formatter follows the way pycodestyle.py
warns about these extra empty lines. Namely, it allows at most 2 blank
lines after line comments that are directly at the top-level of a file
(syntactically, not scope-wise), but only one blank line in any other
position.
2017-07-28 15:23:31 +03:00

35 lines
353 B
Python

# line comment 1
# line comment 2
# line comment 3
def f():
# inner line comment 1
# inner line comment 2
# inner line comment 3
x = 42 # trailing comment 1
# line comment 4
def g():
pass
if True:
# semi top-level comment 1
# semi top-level comment 2
# semi top-level comment 3
class C:
pass