---
source: crates/ruff_linter/src/rules/flake8_quotes/mod.rs
---
docstring_singles_mixed_quotes_class_var_1.py:2:5: Q002 Single quote docstring found but double quotes preferred
  |
1 | class SingleLineDocstrings():
2 |     ''"Start with empty string" ' and lint docstring safely'
  |     ^^ Q002
3 |     ''' Not a docstring '''
  |
  = help: Replace single quotes docstring with double quotes

docstring_singles_mixed_quotes_class_var_1.py:2:33: Q002 [*] Single quote docstring found but double quotes preferred
  |
1 | class SingleLineDocstrings():
2 |     ''"Start with empty string" ' and lint docstring safely'
  |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Q002
3 |     ''' Not a docstring '''
  |
  = help: Replace single quotes docstring with double quotes

ℹ Safe fix
1 1 | class SingleLineDocstrings():
2   |-    ''"Start with empty string" ' and lint docstring safely'
  2 |+    ''"Start with empty string" " and lint docstring safely"
3 3 |     ''' Not a docstring '''
4 4 | 
5 5 |     def foo(self, bar='''not a docstring'''):

docstring_singles_mixed_quotes_class_var_1.py:6:9: Q002 Single quote docstring found but double quotes preferred
  |
5 |     def foo(self, bar='''not a docstring'''):
6 |         ''"Start with empty string" ' and lint docstring safely'
  |         ^^ Q002
7 |         pass
  |
  = help: Replace single quotes docstring with double quotes

docstring_singles_mixed_quotes_class_var_1.py:6:37: Q002 [*] Single quote docstring found but double quotes preferred
  |
5 |     def foo(self, bar='''not a docstring'''):
6 |         ''"Start with empty string" ' and lint docstring safely'
  |                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Q002
7 |         pass
  |
  = help: Replace single quotes docstring with double quotes

ℹ Safe fix
3 3 |     ''' Not a docstring '''
4 4 | 
5 5 |     def foo(self, bar='''not a docstring'''):
6   |-        ''"Start with empty string" ' and lint docstring safely'
  6 |+        ''"Start with empty string" " and lint docstring safely"
7 7 |         pass
8 8 | 
9 9 |     class Nested(foo()[:]): ''"Start with empty string" ' and lint docstring safely'; pass

docstring_singles_mixed_quotes_class_var_1.py:9:29: Q002 Single quote docstring found but double quotes preferred
  |
7 |         pass
8 |
9 |     class Nested(foo()[:]): ''"Start with empty string" ' and lint docstring safely'; pass
  |                             ^^ Q002
  |
  = help: Replace single quotes docstring with double quotes

docstring_singles_mixed_quotes_class_var_1.py:9:57: Q002 [*] Single quote docstring found but double quotes preferred
  |
7 |         pass
8 |
9 |     class Nested(foo()[:]): ''"Start with empty string" ' and lint docstring safely'; pass
  |                                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Q002
  |
  = help: Replace single quotes docstring with double quotes

ℹ Safe fix
6 6 |         ''"Start with empty string" ' and lint docstring safely'
7 7 |         pass
8 8 | 
9   |-    class Nested(foo()[:]): ''"Start with empty string" ' and lint docstring safely'; pass
  9 |+    class Nested(foo()[:]): ''"Start with empty string" " and lint docstring safely"; pass
