Describe the style change
When passing dict as a function parameter I often prefer than the dict is split in multiple lines while keeping other parameters in the same line.
Original code:
db.insert('table', {'a': 10, 'b': 11})
Examples in the current Black style
Adding a trailing comma in the dict results in all parameters split, consuming 7 lines, which feel too excessive in the vertical space usage.
db.insert(
'table',
{
'a': 10,
'b': 11,
},
)
Desired style
A more compact format could be this which only consumes 3 lines.
db.insert('table', {
'a': 10,
'b': 11,
})
Which is, black could only split the dictionary without affecting the function parameters.
Describe the style change
When passing dict as a function parameter I often prefer than the dict is split in multiple lines while keeping other parameters in the same line.
Original code:
Examples in the current Black style
Adding a trailing comma in the dict results in all parameters split, consuming 7 lines, which feel too excessive in the vertical space usage.
Desired style
A more compact format could be this which only consumes 3 lines.
Which is, black could only split the dictionary without affecting the function parameters.