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
Ternary statements that are broken across multiple lines are indented at the same level as the parent line, making them very hard to read, especially if surrounded by additional logic. Prettier handles the equivalent case in JS/TS by adding an indentation level to the ternaries. This would likely need to be behind a flag for ease of migration from Black, but ideally this would be the only behavior if that constraint didn't exist.
Ruff
Prettier
The text was updated successfully, but these errors were encountered:
How would you expect the Python code to be formatted? Since Python ternaries are written out in a different order than JS ternaries, it's difficult to apply the Prettier format directly.
I like the idea and I want to improve the conditional formatting because the current formatting can be hard to read. That's why Black's now parenthesizes long conditionals but I would prefer to find a more readable style without adding extra parentheses (see psf/black#4123)
Ternary statements that are broken across multiple lines are indented at the same level as the parent line, making them very hard to read, especially if surrounded by additional logic. Prettier handles the equivalent case in JS/TS by adding an indentation level to the ternaries. This would likely need to be behind a flag for ease of migration from Black, but ideally this would be the only behavior if that constraint didn't exist.
Ruff
Prettier
The text was updated successfully, but these errors were encountered: