ruff/crates/ruff_linter
Dhruv Manilawala 9d167a1f5c
Slice source code instead of generating it for EM fixes (#7746)
## 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
2023-11-09 05:22:15 +00:00
..
resources/test Slice source code instead of generating it for EM fixes (#7746) 2023-11-09 05:22:15 +00:00
src Slice source code instead of generating it for EM fixes (#7746) 2023-11-09 05:22:15 +00:00
Cargo.toml Prepare release 0.1.5 (#8570) 2023-11-08 16:00:57 -06:00