-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Labels
F: trailing commaFull of magicFull of magicT: styleWhat do we want Blackened code to look like?What do we want Blackened code to look like?
Description
Describe the style change
When a specific dict with callables gets the key looked up and the callable called in one go, the formatting is both uglier than the original and also invalid for flake8.
Examples in the current Black style
Before formatting:
value = "1"
key = "integer"
x = {
"string": str,
"integer": int,
}[key](value)After formatting:
value = "1"
key = "integer"
x = {"string": str, "integer": int,}[
key
](value)This is not valid for flake8, and looks worse than what it was.
Desired style
value = "1"
key = "integer"
x = {
"string": str,
"integer": int,
}[key](value)Or perhaps
value = "1"
key = "integer"
x = {"string": str, "integer": int}[key](value)Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
F: trailing commaFull of magicFull of magicT: styleWhat do we want Blackened code to look like?What do we want Blackened code to look like?