-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Labels
F: empty linesWasting vertical space efficiently.Wasting vertical space efficiently.S: acceptedThe changes in this design / enhancement issue have been accepted and can be implementedThe changes in this design / enhancement issue have been accepted and can be implementedT: styleWhat do we want Blackened code to look like?What do we want Blackened code to look like?
Description
Describe the style change
The blank lines between a function's definition and its docstring currently get removed by Black. However, it does not do the same thing for classes.
Current Black changes
def f():
"""The line above gets removed."""
return 0
becomes
def f():
"""The line above gets removed."""
return 0
but
class C:
"""The line above stays."""
is not modified by Black.
Desired style
I would have expected that code to get reformatted as:
class C:
"""The line above stays."""
Metadata
Metadata
Assignees
Labels
F: empty linesWasting vertical space efficiently.Wasting vertical space efficiently.S: acceptedThe changes in this design / enhancement issue have been accepted and can be implementedThe changes in this design / enhancement issue have been accepted and can be implementedT: styleWhat do we want Blackened code to look like?What do we want Blackened code to look like?