You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Overlong values in e.g. assignment position without sometimes be parenthesized, this seems to depend on whether parenthesizing actually help too not be overlong anymore. The first step of fixing this issue is figuring out the exact criteria for what is indented and what isn't.
konstin
changed the title
Formatter: overlong attribute chains should be wrapped in parentheses
Formatter: overlong value in assignment position without breakpoint are wrongly formatted
Aug 2, 2023
konstin
changed the title
Formatter: overlong value in assignment position without breakpoint are wrongly formatted
Formatter: overlong values in assignment position without breakpoint are wrongly formatted
Aug 2, 2023
This behavior isn't just specific to assignments but applies in general (I haven't understood the details yet).
I believe this is the relevant logic in black. Where it splits the line by adding optional parentheses, but only keeps them if all lines now fit.
I have a branch where I tried to get to the bottom of it but I haven't yet found out the right rules that apply (or messed up the Printer implementation)
MichaReiser
changed the title
Formatter: overlong values in assignment position without breakpoint are wrongly formatted
Formatter: overlong values without breakpoint are parenthesized
Aug 3, 2023
MichaReiser
changed the title
Formatter: overlong values without breakpoint are parenthesized
Formatter: overlong values without breakpoint are never parenthesized
Aug 3, 2023
Overlong values in e.g. assignment position without sometimes be parenthesized, this seems to depend on whether parenthesizing actually help too not be overlong anymore. The first step of fixing this issue is figuring out the exact criteria for what is indented and what isn't.
input and our output:
black:
The text was updated successfully, but these errors were encountered: