Replies: 1 comment
-
You could change the line length in the Ruff configuration and use your editor to only format the modified ranges. The CLI currently doesn't support formatting modified lines only (Ruff has no git integration). You'd have to build your own script that feeds the modified ranges from git (or whatever version control system you use) to
I don't think I can answer this for you. There are too many organisational factors that influence this decision. But it's probably what I would be doing. Accept the one time churn. You can mitigate it by adding the commit to |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
In a few of our repos the line length is set at 110. However, I am thinking of reducing it so that diffs are easier to read on smaller screens. I'd rather not do this for every file all at once, and even for a whole file at once. Ideally when I make a functional change to a block of code I would reformat it to be the new line length. But ruff will format lines back to 110 if possible, which is not wanted.
Is there an easy way to do what I'm looking for with ruff? Or is this something that I should do all at once?
Beta Was this translation helpful? Give feedback.
All reactions