mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-18 12:31:26 +07:00
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.
35 lines
353 B
Python
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 |