mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-27 18:36:35 +00:00
<!-- Thank you for contributing to Ruff/ty! To help us out with reviewing, please consider the following: - Does this pull request include a summary of the change? (See below.) - Does this pull request include a descriptive title? (Please prefix with `[ty]` for ty pull requests.) - Does this pull request include references to any relevant issues? --> ## Summary <!-- What's the purpose of the change? What does it do, and why? --> Fixes #19887 - flynt(FLY002): When joining only string constants, upgrade raw single-quoted strings to raw triple-quoted if the resulting content contains a newline. - Choose a safe triple-quote delimiter by switching to the opposite quote style if the preferred triple appears inside the content. - Update FLY002 snapshot to include the `\n'.join([r'line1','line2'])` case. ## Test Plan I've added one test case to FLY002.py. <!-- How was it tested? --> --------- Co-authored-by: Brent Westbrook <36778786+ntBre@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| FLY002.py | ||