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

Q001 [*] Double quote multiline found but single quotes preferred
  --> docstring_doubles.py:16:5
   |
14 |       """
15 |
16 | /     """
17 | |     this is not a docstring
18 | |     """
   | |_______^
19 |
20 |       # The colon in the list indexing below is an edge case for the docstring scanner
   |
help: Replace double multiline quotes with single quotes
   |
15 |
   -     """
16 +     '''
17 |     this is not a docstring
   -     """
18 +     '''
19 |
   |

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

Q001 [*] Double quote multiline found but single quotes preferred
  --> docstring_doubles.py:30:9
   |
28 |           some_expression = 'hello world'
29 |
30 | /         """
31 | |         this is not a docstring
32 | |         """
   | |___________^
33 |
34 |           if l:
   |
help: Replace double multiline quotes with single quotes
   |
29 |
   -         """
30 +         '''
31 |         this is not a docstring
   -         """
32 +         '''
33 |
   |

Q001 [*] Double quote multiline found but single quotes preferred
  --> docstring_doubles.py:35:13
   |
34 |           if l:
35 | /             """
36 | |             Looks like a docstring, but in reality it isn't - only modules, classes and functions
37 | |             """
   | |_______________^
38 |               pass
   |
help: Replace double multiline quotes with single quotes
   |
34 |         if l:
   -             """
35 +             '''
36 |             Looks like a docstring, but in reality it isn't - only modules, classes and functions
   -             """
37 +             '''
38 |             pass
   |
