-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
formatterRelated to the formatterRelated to the formattergood first issueGood for newcomersGood for newcomershelp wantedContributions especially welcomeContributions especially welcome
Milestone
Description
Black only formats one empty line between top level items in stub files (.pyi), while it uses two empty lines in regular python files. When single line classes, method and functions of the same kind that are stubbed out with ellipses follow each they don't get any empty lines.
scratch.py
class A:
def __init__(self):
pass
class B:
def __init__(self):
pass
def foo():
pass
class Del(expr_context):
...
class Load(expr_context):
...
class Store(expr_context):
...scratch.pyi
class A:
def __init__(self):
pass
class B:
def __init__(self):
pass
def foo():
pass
class Del(expr_context): ...
class Load(expr_context): ...
class Store(expr_context): ...The relevant code is below, which doesn't have access to whether it's in a stub file or not yet.
| &format_args![empty_line(), empty_line()], |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
formatterRelated to the formatterRelated to the formattergood first issueGood for newcomersGood for newcomershelp wantedContributions especially welcomeContributions especially welcome