---
source: crates/ruff_linter/src/rules/flake8_quotes/mod.rs
snapshot_kind: text
---
docstring_singles.py:1:1: Q002 [*] Single quote docstring found but double quotes preferred
  |
1 | / '''
2 | | Single quotes multiline module docstring
3 | | '''
  | |___^ Q002
4 |   
5 |   '''
  |
  = help: Replace single quotes docstring with double quotes

ℹ Safe fix
1   |-'''
  1 |+"""
2 2 | Single quotes multiline module docstring
3   |-'''
  3 |+"""
4 4 | 
5 5 | '''
6 6 | this is not a docstring

docstring_singles.py:14:5: Q002 [*] Single quote docstring found but double quotes preferred
   |
12 |       class params \t not a docstring
13 |   ''')):
14 |       '''
   |  _____^
15 | |     Single quotes multiline class docstring
16 | |     '''
   | |_______^ Q002
17 |   
18 |       '''
   |
   = help: Replace single quotes docstring with double quotes

ℹ Safe fix
11 11 | class Cls(MakeKlass('''
12 12 |     class params \t not a docstring
13 13 | ''')):
14    |-    '''
   14 |+    """
15 15 |     Single quotes multiline class docstring
16    |-    '''
   16 |+    """
17 17 | 
18 18 |     '''
19 19 |     this is not a docstring

docstring_singles.py:26:9: Q002 [*] Single quote docstring found but double quotes preferred
   |
24 |           definitely not a docstring''',
25 |           val=l[Cls():3]):
26 |           '''
   |  _________^
27 | |         Single quotes multiline function docstring
28 | |         '''
   | |___________^ Q002
29 |   
30 |           some_expression = 'hello world'
   |
   = help: Replace single quotes docstring with double quotes

ℹ Safe fix
23 23 |     def f(self, bar='''
24 24 |         definitely not a docstring''',
25 25 |         val=l[Cls():3]):
26    |-        '''
   26 |+        """
27 27 |         Single quotes multiline function docstring
28    |-        '''
   28 |+        """
29 29 | 
30 30 |         some_expression = 'hello world'
31 31 |
