yapf icon indicating copy to clipboard operation
yapf copied to clipboard

Remove the blank line between docstring and function head

Open xnuohz opened this issue 2 years ago • 0 comments

How would I change yapf config to remove the blank line between docstring and function head? My yapf config

[tool.yapf]
based_on_style = "pep8"
column_limit = 120
split_before_named_assigns = false
blank_line_before_nested_class_or_def = false

Expect

"""
    some comments
    @param xxx
    @return xxx
"""
>>>>  remove this blank line
def func(xxx):
    xxxx

After pre-commit checking, it always keeps the blank line.

xnuohz avatar Dec 20 '23 08:12 xnuohz