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)
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:
After formatting:
This is not valid for flake8, and looks worse than what it was.
Desired style
Or perhaps