ruff/crates/ruff_linter
konsti f70e8a7524
Fix PLE251 rules with f-string escaping (#7741)
**Summary** The `value` of the `FStringMiddle` for `f"""}}ab"""` is
`}ab`, i.e. the curly brace escaping is decoded. If we iterate over
string this gives us false indices causing exploding fixes for PLE251
rules (PLE2510, PLE2512, PLE2513, PLE2514, PLE2515). Instead, we now use
the source range.

Handles
https://github.com/astral-sh/ruff/issues/7455#issuecomment-1741998106
Handles
https://github.com/astral-sh/ruff/issues/7455#issuecomment-1741998256

**Test Plan** Minimized fuzzing cases as fixtures.
2023-10-02 08:43:39 +00:00
..
resources/test Fix PLE251 rules with f-string escaping (#7741) 2023-10-02 08:43:39 +00:00
src Fix PLE251 rules with f-string escaping (#7741) 2023-10-02 08:43:39 +00:00
Cargo.toml Improve performance of commented-out-code (~50-80%) (#7706) 2023-09-29 20:13:12 +00:00