Open MichaReiser opened 3 weeks ago
Hmm, I might have to fix this for the implicit concatenated string formatting because it handles this correctly and this now results in instable formatting
One challenge is that we don't want to inline the comments if the expression breaks:
a = f"test{
expression
}flat" f"can be {
joined
} togethereeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" # inline
Should be formatted to
a = (
f"test{expression}flatcan be {
joined
} togethereeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"
) # inline
and not
```python
a = (
f"test{expression}flatcan be {
joined
} togethereeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" # inline
)
Hmm, I might have to fix this for the implicit concatenated string formatting because it handles this correctly and this now results in instable formatting
@MichaReiser Just want to check-in whether you ended up fixing this with implicit concatenated string formatting?
I fixed the instability but I didn't fix the formatting. I suggest waiting with this task until the implicit concatenated string formatting PR is merged or that you work on top of it. We'll otherwise end up with horrible merge conflicts
The new f-string formatting in assignment-value positions seems inconsistent to me:
Gets formatted to:
Which avoids parentheses but it doesn't feel like the ideal formatting and it doesn't match the formatting if the expression starts out "flat"