mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-02 09:52:18 +00:00
471 B
471 B
avoidable-escaped-quote (Q003)
Derived from the flake8-quotes linter.
Autofix is always available.
What it does
Checks for strings that include escaped quotes, and suggests changing the quote style to avoid the need to escape them.
Why is this bad?
It's preferable to avoid escaped quotes in strings. By changing the outer quote style, you can avoid escaping inner quotes.
Example
foo = 'bar\'s'
Use instead:
foo = "bar's"