-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
At present, git_ruff.py generates diffs when a change is suggested. One unified diff is generated per suggestion. We do not generate one diff for the entire run for a few different reasons:
- Due to newline normalization, the generated diffs may not work with tools such as
patch. - Every change suggested by ruff is a judgement call. Applying a bunch of changes without consideration is reckless.
- Ruff may have more than one suggestion for how to fix a failed check. This cannot be represented in a single unified diff.
However, as other team members have pointed out, manually applying a large number of suggested changes can be cumbersome. Let's implement the ability to apply suggested changes interactively, similar to git add -p. Additionally, for cases where there are no overlapping suggestions, we can provide the option to apply all suggested changes at once (even though it may be a bad idea to do so).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels