---
source: crates/ruff/src/rules/flake8_quotes/mod.rs
---
singles_escaped.py:1:26: Q003 [*] Change outer quotes to avoid escaping inner quotes
  |
1 | this_should_raise_Q003 = "This is a \"string\""
  |                          ^^^^^^^^^^^^^^^^^^^^^^ Q003
2 | this_is_fine = "'This' is a \"string\""
3 | this_is_fine = 'This is a "string"'
  |
  = help: Change outer quotes to avoid escaping inner quotes

ℹ Suggested fix
1   |-this_should_raise_Q003 = "This is a \"string\""
  1 |+this_should_raise_Q003 = 'This is a "string"'
2 2 | this_is_fine = "'This' is a \"string\""
3 3 | this_is_fine = 'This is a "string"'
4 4 | this_is_fine = '\'This\' is a "string"'

singles_escaped.py:9:5: Q003 [*] Change outer quotes to avoid escaping inner quotes
   |
 9 | this_should_raise = (
10 |     "This is a"
11 |     "\"string\""
   |     ^^^^^^^^^^^^ Q003
12 | )
   |
   = help: Change outer quotes to avoid escaping inner quotes

ℹ Suggested fix
6  6  | this_is_fine = R"This is a \"string\""
7  7  | this_should_raise = (
8  8  |     "This is a"
9     |-    "\"string\""
   9  |+    '"string"'
10 10 | )


