mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-01 06:11:43 +00:00
24 lines
No EOL
540 B
Markdown
24 lines
No EOL
540 B
Markdown
# bad-quotes-inline-string (Q000)
|
|
|
|
Derived from the **flake8-quotes** linter.
|
|
|
|
Autofix is always available.
|
|
|
|
## What it does
|
|
Checks for inline strings that use single quotes or double quotes,
|
|
depending on the value of the [`inline-quotes`](https://github.com/charliermarsh/ruff#inline-quotes)
|
|
setting.
|
|
|
|
## Why is this bad?
|
|
Consistency is good. Use either single or double quotes for inline
|
|
strings, but be consistent.
|
|
|
|
## Example
|
|
```python
|
|
foo = 'bar'
|
|
```
|
|
|
|
Assuming `inline-quotes` is set to `double`, use instead:
|
|
```python
|
|
foo = "bar"
|
|
``` |