How about add fix/autofix ruff?
I recently worked on STYLE enable ruff TCH and found that ruff reports some error could (eg: Trailing whitespace, ) been easily autofixed, by adding --fix
(or more specific flags) as argument to config.
I must admit that these errors can also be fixed manually. However, if the automation does not significantly slow down the process, why not let them be fixed automatically? It is worth noting that automatic fixes are still being developed and modified, and whether they should be used or not may require further discussion.
Some maybe related: ruff-tried-to-fix-something-but-it-broke-my-code? Usage - Ruff Configuration - Ruff
Comment From: MarcoGorelli
sure, if there's a way to not auto-fix E721, I'm all for it
Comment From: twoertwein
ruff allows to black-list unfixable rules
unfixable = ["E721"]
Comment From: MarcoGorelli
awesome! is there anything ruff can't do? 😄
Comment From: luke396
I would like to try doing this, and if we decide to move forward with it ( may need some assistance...).
Comment From: MarcoGorelli
sure go ahead