-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix PLE251 rules with f-string escaping
**Summary** The `value` of the `FStringMiddle` for `f"""}}a�b"""` is `}a�b`, 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 #7455 (comment) Handles #7455 (comment) **Test Plan** Minimized fuzzing cases as fixtures.
- Loading branch information
Showing
6 changed files
with
55 additions
and
1 deletion.
There are no files selected for viewing
Binary file modified
BIN
+178 Bytes
(110%)
crates/ruff_linter/resources/test/fixtures/pylint/invalid_characters.py
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters