Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ehats opened this issue May 12, 2023 · 2 comments · May be fixed by #1180
Open

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

ehats opened this issue May 12, 2023 · 2 comments · May be fixed by #1180

Comments

@ehats
Copy link

ehats commented May 12, 2023

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?

@gokullan
Copy link

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

@Spitfire1900
Copy link
Contributor

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.

@ashmichheda ashmichheda linked a pull request Nov 13, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants