---
source: crates/ruff_linter/src/rules/flake8_quotes/mod.rs
---
Q002 [*] Single quote docstring found but double quotes preferred
 --> docstring_singles_mixed_quotes_class_var_2.py:2:5
  |
1 | class SingleLineDocstrings():
2 |     'Do not'" start with empty string" ' and lint docstring safely'
  |     ^^^^^^^^
3 |     ''' Not a docstring '''
  |
help: Replace single quotes docstring with double quotes
  |
1 | class SingleLineDocstrings():
  -     'Do not'" start with empty string" ' and lint docstring safely'
2 +     "Do not"" start with empty string" ' and lint docstring safely'
3 |     ''' Not a docstring '''
  |

Q002 [*] Single quote docstring found but double quotes preferred
 --> docstring_singles_mixed_quotes_class_var_2.py:2:40
  |
1 | class SingleLineDocstrings():
2 |     'Do not'" start with empty string" ' and lint docstring safely'
  |                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3 |     ''' Not a docstring '''
  |
help: Replace single quotes docstring with double quotes
  |
1 | class SingleLineDocstrings():
  -     'Do not'" start with empty string" ' and lint docstring safely'
2 +     'Do not'" start with empty string" " and lint docstring safely"
3 |     ''' Not a docstring '''
  |

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

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

Q002 [*] Single quote docstring found but double quotes preferred
 --> docstring_singles_mixed_quotes_class_var_2.py:9:29
  |
7 |         pass
8 |
9 |     class Nested(foo()[:]): 'Do not'" start with empty string" ' and lint docstring safely'; pass
  |                             ^^^^^^^^
  |
help: Replace single quotes docstring with double quotes
  |
8 |
  -     class Nested(foo()[:]): 'Do not'" start with empty string" ' and lint docstring safely'; pass
9 +     class Nested(foo()[:]): "Do not"" start with empty string" ' and lint docstring safely'; pass
  |

Q002 [*] Single quote docstring found but double quotes preferred
 --> docstring_singles_mixed_quotes_class_var_2.py:9:64
  |
7 |         pass
8 |
9 |     class Nested(foo()[:]): 'Do not'" start with empty string" ' and lint docstring safely'; pass
  |                                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
help: Replace single quotes docstring with double quotes
  |
8 |
  -     class Nested(foo()[:]): 'Do not'" start with empty string" ' and lint docstring safely'; pass
9 +     class Nested(foo()[:]): 'Do not'" start with empty string" " and lint docstring safely"; pass
  |
