-
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
Two blank lines after an import should be reduced to one #2020
Comments
I'm sure I've seen a design issue talking about this, but I can't seem to find it... Maybe the issue doesn't actually exist and I'm just acting crazy :) |
Also, can't reproduce on the Black Playground. |
Can't find any duplicates in
F: empty lines
|
The two-line issue still persists: playground |
hey! I opened a PR here trying to address this issue #4489 - I made some test cases from the examples in the issue description which are working as described |
Describe the style change
This applies to the first line of code after the block of imports at the top of the file.
These lines are not changed by black:
This is changed to the above (makes sense to me):
However, black does not reformat this:
This is very annoying since it allows for inconsistency.
Desired style
I think
black
should reformat that final example to look like the first. As an alternative, it could also always leave two lines. Either one or two lines is fine by me, but only one option should be valid.Additional context
I think it's that simple.
The text was updated successfully, but these errors were encountered: