ruff/crates/ruff_linter
Dylan 3fda2d17c7
[ruff] Auto-add r prefix when string has no backslashes for unraw-re-pattern (RUF039) (#14536)
This PR adds a sometimes-available, safe autofix for [unraw-re-pattern
(RUF039)](https://docs.astral.sh/ruff/rules/unraw-re-pattern/#unraw-re-pattern-ruf039),
which prepends an `r` prefix. It is used only when the string in
question has no backslahses (and also does not have a `u` prefix, since
that causes a syntax error.)

Closes #14527

Notes: 
- Test fixture unchanged, but snapshot changed to include fix messages.
- This fix is automatically only available in preview since the rule
itself is in preview
2024-11-22 15:09:53 -06:00
..
resources Extend invalid-envvar-default (PLW1508) to detect os.environ.get (#14512) 2024-11-22 19:13:58 +00:00
src [ruff] Auto-add r prefix when string has no backslashes for unraw-re-pattern (RUF039) (#14536) 2024-11-22 15:09:53 -06:00
Cargo.toml Ruff 0.8 release (#14486) 2024-11-22 08:45:19 +01:00