-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
formatterRelated to the formatterRelated to the formattergood first issueGood for newcomersGood for newcomers
Milestone
Description
Black breaks the if into its own line if the comprehension breaks
a = (
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
for f in bbbbbbbbbbbbbbb
if f not in ccccccccccc
)while we don't
a = (
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
for f in bbbbbbbbbbbbbbb if f not in ccccccccccc
)Conversely, parentheses should not require the target breaking
black:
aaaaaaaaaaaaaaaaaaaaa = (
o for o in self.registry.values if o.__class__ is not ModelAdmin
)ours:
aaaaaaaaaaaaaaaaaaaaa = (
o
for o in self.registry.values if o.__class__ is not ModelAdmin
)Fixing this requires changing the grouping strategy for comprehensions and generator expressions.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
formatterRelated to the formatterRelated to the formattergood first issueGood for newcomersGood for newcomers