ruff/crates/ruff_diagnostics
Charlie Marsh 1cf3b5676f
Perform insertions before replacements (#7739)
## Summary

If we have, e.g.:

```python
sum((
            factor.dims for factor in bases
        ), [])
```

We generate three edits: two insertions (for the `operator` and
`functools` imports), and then one replacement (for the `sum` call
itself). We need to ensure that the insertions come before the
replacement; otherwise, the edits will appear overlapping and
out-of-order.

Closes https://github.com/astral-sh/ruff/issues/7718.
2023-10-01 14:53:54 +00:00
..
src Perform insertions before replacements (#7739) 2023-10-01 14:53:54 +00:00
Cargo.toml Pull in RustPython parser (#6099) 2023-07-27 09:29:11 +00:00