-
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
Enforce blank line after module docstring #1872
Labels
F: empty lines
Wasting vertical space efficiently.
T: style
What do we want Blackened code to look like?
Comments
Agree that we should add a blank line here. |
JelleZijlstra
added
C: cleanup
Refactoring and removing dust :)
F: empty lines
Wasting vertical space efficiently.
and removed
C: cleanup
Refactoring and removing dust :)
labels
May 30, 2021
A moderate +1 for the proposal. To get a feel for multiline docstrings and some more imports: """
Multiline docstring.
That explains details about the module.
"""
import stuff
import antigravity
from __future__ import braces
# VS
"""
Multiline docstring.
That explains details about the module.
"""
import stuff
import antigravity
from __future__ import braces I don't have a strong preference either way. Personally I don't add the empty line because the |
3 tasks
3 tasks
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
F: empty lines
Wasting vertical space efficiently.
T: style
What do we want Blackened code to look like?
Black does not have an opinion on whether there should be a blank line immediately after a module's docstring. This causes inconsistencies across blackened files because whatever the author chooses, stays.
Both examples below satisfy black:
My preference would be to enforce a blank line.
Related issue: #450
The text was updated successfully, but these errors were encountered: