Skip to content

Improve multiline_string_handling with ternaries and dictionaries #4657

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

cobaltt7
Copy link
Collaborator

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
Copy link
Collaborator Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

multiline_string_handling sometimes leads to worse formatting
1 participant