black icon indicating copy to clipboard operation
black copied to clipboard

Improve `multiline_string_handling` with ternaries and dictionaries

Open cobaltt7 opened this issue 7 months ago • 1 comments

Description

Resolves #4159

As I summarized there, most of the issues described can not be fixed easily. This PR resolves the two problems with obvious fixes: dictionary values with multiline strings should stay parenthesized, and ternaries with multiline strings in the value should stay parenthesized. Again, I don't believe we can do anything for the other pain points mentioned, so this PR resolves the issue as much as possible.

Checklist - did you ...

  • [n] Add an entry in CHANGES.md if necessary?
  • [y] Add / update tests if necessary?
  • [-] Add new / update outdated documentation?

cobaltt7 avatar Apr 26 '25 01:04 cobaltt7

No idea why Fuzz is failing, I didn't touch anything that should relate to that

cobaltt7 avatar Apr 26 '25 02:04 cobaltt7