mirror of
https://github.com/astral-sh/ruff.git
synced 2025-07-24 05:25:17 +00:00
![]() ## Summary Right now, if we have two fixes that have an overlapping edit, but not an _identical_ set of edits, they'll conflict, causing us to do another linter traversal. Here, I've enabled the fixer to support partially overlapping edits, which (as an example) let's us greatly reduce the number of iterations required in the test suite. The most common case here is that in which a bunch of edits need to import some symbol, and then use that symbol, but in different ways. In that case, all edits will have a common fix (to import the symbol), but deviate in some way. With this change, we can do all of those edits in one pass. Note that the simplest way to enable this was to store sorted edits on `Fix`. We don't allow modifying the edits on `Fix` once it's constructed, so this is an easy change, and allows us to avoid a bunch of clones and traversals later on. Closes #5800. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |