---
source: crates/ruff_linter/src/rules/flake8_quotes/mod.rs
---
docstring_singles.py:5:1: Q001 [*] Single quote multiline found but double quotes preferred
  |
3 |   '''
4 |   
5 | / '''
6 | | this is not a docstring
7 | | '''
  | |___^ Q001
8 |   
9 |   l = []
  |
  = help: Replace single multiline quotes with double quotes

ℹ Safe fix
2 2 | Single quotes multiline module docstring
3 3 | '''
4 4 | 
5   |-'''
  5 |+"""
6 6 | this is not a docstring
7   |-'''
  7 |+"""
8 8 | 
9 9 | l = []
10 10 | 

docstring_singles.py:11:21: Q001 [*] Single quote multiline found but double quotes preferred
   |
 9 |   l = []
10 |   
11 |   class Cls(MakeKlass('''
   |  _____________________^
12 | |     class params \t not a docstring
13 | | ''')):
   | |___^ Q001
14 |       '''
15 |       Single quotes multiline class docstring
   |
   = help: Replace single multiline quotes with double quotes

ℹ Safe fix
8  8  | 
9  9  | l = []
10 10 | 
11    |-class Cls(MakeKlass('''
   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 |     '''

docstring_singles.py:18:5: Q001 [*] Single quote multiline found but double quotes preferred
   |
16 |       '''
17 |   
18 |       '''
   |  _____^
19 | |     this is not a docstring
20 | |     '''
   | |_______^ Q001
21 |   
22 |       # The colon in the list indexing below is an edge case for the docstring scanner
   |
   = help: Replace single multiline quotes with double quotes

ℹ Safe fix
15 15 |     Single quotes multiline class docstring
16 16 |     '''
17 17 | 
18    |-    '''
   18 |+    """
19 19 |     this is not a docstring
20    |-    '''
   20 |+    """
21 21 | 
22 22 |     # The colon in the list indexing below is an edge case for the docstring scanner
23 23 |     def f(self, bar='''

docstring_singles.py:23:21: Q001 [*] Single quote multiline found but double quotes preferred
   |
22 |       # The colon in the list indexing below is an edge case for the docstring scanner
23 |       def f(self, bar='''
   |  _____________________^
24 | |         definitely not a docstring''',
   | |_____________________________________^ Q001
25 |           val=l[Cls():3]):
26 |           '''
   |
   = help: Replace single multiline quotes with double quotes

ℹ Safe fix
20 20 |     '''
21 21 | 
22 22 |     # The colon in the list indexing below is an edge case for the docstring scanner
23    |-    def f(self, bar='''
24    |-        definitely not a docstring''',
   23 |+    def f(self, bar="""
   24 |+        definitely not a docstring""",
25 25 |         val=l[Cls():3]):
26 26 |         '''
27 27 |         Single quotes multiline function docstring

docstring_singles.py:32:9: Q001 [*] Single quote multiline found but double quotes preferred
   |
30 |           some_expression = 'hello world'
31 |   
32 |           '''
   |  _________^
33 | |         this is not a docstring
34 | |         '''
   | |___________^ Q001
35 |   
36 |           if l:
   |
   = help: Replace single multiline quotes with double quotes

ℹ Safe fix
29 29 | 
30 30 |         some_expression = 'hello world'
31 31 | 
32    |-        '''
   32 |+        """
33 33 |         this is not a docstring
34    |-        '''
   34 |+        """
35 35 | 
36 36 |         if l:
37 37 |             '''

docstring_singles.py:37:13: Q001 [*] Single quote multiline found but double quotes preferred
   |
36 |           if l:
37 |               '''
   |  _____________^
38 | |             Looks like a docstring, but in reality it isn't - only modules, classes and functions
39 | |             '''
   | |_______________^ Q001
40 |               pass
   |
   = help: Replace single multiline quotes with double quotes

ℹ Safe fix
34 34 |         '''
35 35 | 
36 36 |         if l:
37    |-            '''
   37 |+            """
38 38 |             Looks like a docstring, but in reality it isn't - only modules, classes and functions
39    |-            '''
   39 |+            """
40 40 |             pass


