Proper formatting of mathematical expression with Ruff #8543
-
First of all, thanks for the great work, ruff is amazing. However, I have not been able to fully move to ruff since, like black, it does not seem to handle mathematical expressions properly. See here and here. For example,
I can configure VS Code to fix violations on-save using Ruff, then re-format with yapf, using the similar steps indicated in the doc for Black. However, I'd like to stick to ruff-only ? How can I achieve this ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey @cgadal Thanks for your feedback. We received similar feedback around formatting python code in the scientific community in the Formatter Beta. Our main focus for now is compatibility with black instead of innovating a new formatters style, but we'll eventually look into how Ruff can better format complex mathematical expressions (and we'll need the community's feedback to achieve this). But for now, changing the way mathematical expressions isn't planned. |
Beta Was this translation helpful? Give feedback.
Hey @cgadal
Thanks for your feedback. We received similar feedback around formatting python code in the scientific community in the Formatter Beta. Our main focus for now is compatibility with black instead of innovating a new formatters style, but we'll eventually look into how Ruff can better format complex mathematical expressions (and we'll need the community's feedback to achieve this). But for now, changing the way mathematical expressions isn't planned.