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

[Feature request] "Fix all $RULE" code action #46

Open
rassie opened this issue Dec 29, 2022 · 1 comment
Open

[Feature request] "Fix all $RULE" code action #46

rassie opened this issue Dec 29, 2022 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@rassie
Copy link

rassie commented Dec 29, 2022

This would probably require an additional option for ruff itself, but it'd be very cool to be able to apply fixes of a particular rule all at once, while being able to weed through the others. A typical example could be UP007 -- there could be dozens in a single file and it's rather tedious to apply fixes for each separate case e.g. when upgrading from Python 3.8 to 3.11. Would be nice to have "Fix all", "Fix UP007" and "Fix all UP007 in file" to choose from.

@charliermarsh charliermarsh added the enhancement New feature or request label Dec 29, 2022
@charliermarsh
Copy link
Member

Yeah that's a nice suggestion. We could probably detect when you have more than one instance of a given error in a file, and only expose it in those cases.

@charliermarsh charliermarsh added the good first issue Good for newcomers label Jan 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants