-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed as not planned
Labels
F: empty linesWasting vertical space efficiently.Wasting vertical space efficiently.T: styleWhat do we want Blackened code to look like?What do we want Blackened code to look like?
Description
Describe the style change
Currently, black does not check blank lines between functions docstring and body.
That means both these options are valid:
def foo():
"""docstring"""
return 0def foo():
"""docstring"""
return 0As black is uncompromising and opinionated, I guess this should be taken into account.
Personally I tend to put a blank line but looking at the only potential reference PEP 257, there is no blank lines in given examples.
Whether we enforce the blank line or not, black should take care of this as this results in easy style inconsistency.
I'd say we should follow PEP 257 no blank line example.
Comment your opinion so that this issue can be refered to in a PR fixing this.
If there is no consensus, we could organize a jousting match to settle this. ![]()
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
F: empty linesWasting vertical space efficiently.Wasting vertical space efficiently.T: styleWhat do we want Blackened code to look like?What do we want Blackened code to look like?