mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-26 18:06:36 +00:00
## Summary
This PR fixes the bug where the generated fix for `EM*` rules would
replace a
triple-quoted (f-)string with a single-quoted (f-)string. This changes
the
semantic of the string in case it contains a single-quoted string
literal. This
is especially evident with f-strings where the expression could contain
another
string within it. For example,
```python
f"""normal {"another"} normal"""
```
## Test Plan
Add test case for triple-quoted string and update the snapshots.
fixes: #6988
fixes: #7736
|
||
|---|---|---|
| .. | ||
| resources/test | ||
| src | ||
| Cargo.toml | ||