ruff/crates
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
..
flake8_to_ruff Add explicit-preview-rules to toggle explicit selection of preview rules (#7390) 2023-09-28 15:00:33 -05:00
ruff_benchmark Add support for PEP 701 (#7376) 2023-09-29 02:55:39 +00:00
ruff_cache Introduce FormatterSettings (#7545) 2023-09-21 08:01:24 +02:00
ruff_cli Compute NotebookIndex for Diagnostics on stdin (#7663) 2023-09-29 20:37:41 +00:00
ruff_dev Rename Autofix to Fix (#7657) 2023-09-28 10:53:05 +00:00
ruff_diagnostics Perform insertions before replacements (#7739) 2023-10-01 14:53:54 +00:00
ruff_formatter Add most formatter options to ruff.toml / pyproject.toml (#7566) 2023-09-22 15:47:57 +00:00
ruff_index Add unreachable code rule (#5384) 2023-07-04 14:27:23 +00:00
ruff_linter Fix PLE251 rules with f-string escaping (#7741) 2023-10-02 08:43:39 +00:00
ruff_macros Require documentation for all lint rules (#7751) 2023-10-02 01:49:07 +00:00
ruff_notebook Compute NotebookIndex for Diagnostics on stdin (#7663) 2023-09-29 20:37:41 +00:00
ruff_python_ast Add support for PEP 701 (#7376) 2023-09-29 02:55:39 +00:00
ruff_python_codegen Add support for PEP 701 (#7376) 2023-09-29 02:55:39 +00:00
ruff_python_formatter Remove string allocation in relative import formatting (#7743) 2023-10-01 18:15:43 +00:00
ruff_python_index Add support for PEP 701 (#7376) 2023-09-29 02:55:39 +00:00
ruff_python_literal Implement our own small-integer optimization (#7584) 2023-09-25 15:13:21 +00:00
ruff_python_parser Skip all bracketed expressions when locating comparison ops (#7740) 2023-10-01 14:57:40 +00:00
ruff_python_resolver Replace .map_or(false, $closure) with .is_some_and(closure) (#6244) 2023-08-01 19:29:42 +02:00
ruff_python_semantic Track fix isolation in unnecessary-pass (#7715) 2023-09-29 17:23:04 +00:00
ruff_python_stdlib Use u8 to represent version segments (#7578) 2023-09-21 14:24:51 -04:00
ruff_python_trivia Extend pragma comment cases (#7687) 2023-09-28 18:55:19 +00:00
ruff_shrinking Add support for PEP 701 (#7376) 2023-09-29 02:55:39 +00:00
ruff_source_file Skip BOM when inserting start-of-file imports (#7622) 2023-09-23 19:36:50 +00:00
ruff_text_size Unify line size settings between ruff and the formatter (#6873) 2023-08-28 06:44:56 +00:00
ruff_wasm Add support for PEP 701 (#7376) 2023-09-29 02:55:39 +00:00
ruff_workspace Add consistent period in options documentation (#7725) 2023-09-30 23:07:30 +00:00