-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Don't insert extra blank lines at the start of an indent #3089
Comments
@felix-hilden I just checked #3035 and it doesn't work for my case. I believe there is another rule which enforces one blank line before function/class declaration and there is a conflict as a result. |
Right, I checked the code once more, sorry about that. The line in question I believe is this, which forces a newline if we are some blocks deep in the nesting for defs and classes. I agree with you that after opening a block, a new line before defs and classes is pretty redundant. So after #3035 is merged, I'd be happy to include this one as well! Others? |
Duplicate of #450 |
Describe the style change
If a function/class is defined at the start of a non-scoping indent (e.g.
if
,for
) a blank line is inserted before the function.I would like this removed, since:
def
,class
) no blank line is inserted and I would prefer if style was consistent.Examples in the current Black style
Desired style
Additional context
The issue came up when my team was developing a tool to remove blank lines at the start of indents, would be cool if black autocorrected that as well.
The text was updated successfully, but these errors were encountered: