Skip to content
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

Nested expression formatting #12856

Open
MichaReiser opened this issue Aug 13, 2024 · 0 comments
Open

Nested expression formatting #12856

MichaReiser opened this issue Aug 13, 2024 · 0 comments
Labels
formatter Related to the formatter

Comments

@MichaReiser
Copy link
Member

I was surprised that there's no existing issue for this.

We decided not to implement the following Black 24 style changes:

  • parenthesize_long_type_hints,
  • wrap_long_dict_values_in_parens
  • parenthesize_conditional_expressions

Because a) implementing this in Ruff is kind of hard (or slow) and b) it goes against the overall goal to avoid unnecessary parentheses.

This Black issue goes into more detail about our concerns. We should explore different designs that yields better sub-expression formatting without requiring optional parentheses to improve readability.

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

No branches or pull requests

1 participant