yapf icon indicating copy to clipboard operation
yapf copied to clipboard

No blank line after if/for/while/def, etc.

Open ehats opened this issue 1 year ago • 2 comments

Currently, yapf formats the following code:

if True:




    print(2)

like this:

if True:

    print(2)

However, I don't want to have blank lines right at the beginning of blocks, e.g. I want yapf to do this:

if True:
    print(2)

I thought that a knob would exist for this for sure, but I wasn't able to find it - could you please point me in the right direction?

ehats avatar May 12 '23 11:05 ehats

Hello! Can this be assigned to me? I would like to work on it.

gokullan avatar Jun 15 '23 04:06 gokullan

Hello! Can this be assigned to me? I would like to work on it.

I don't think there is a practice of assigning in this project, just open a PR that says closes #1091 in the description field.

Spitfire1900 avatar Jun 16 '23 14:06 Spitfire1900