---
source: crates/ruff_linter/src/rules/flake8_quotes/mod.rs
---
Q001 [*] Double quote multiline found but single quotes preferred
 --> docstring_doubles_function.py:3:5
  |
1 | def foo():
2 |     """function without params, single line docstring"""
3 |     """ not a docstring"""
  |     ^^^^^^^^^^^^^^^^^^^^^^
4 |     return
  |
help: Replace double multiline quotes with single quotes
  |
2 |     """function without params, single line docstring"""
  -     """ not a docstring"""
3 +     ''' not a docstring'''
4 |     return
  |

Q001 [*] Double quote multiline found but single quotes preferred
  --> docstring_doubles_function.py:11:5
   |
 9 |         function without params, multiline docstring
10 |     """
11 |     """ not a docstring"""
   |     ^^^^^^^^^^^^^^^^^^^^^^
12 |     return
   |
help: Replace double multiline quotes with single quotes
   |
10 |     """
   -     """ not a docstring"""
11 +     ''' not a docstring'''
12 |     return
   |

Q001 [*] Double quote multiline found but single quotes preferred
  --> docstring_doubles_function.py:15:39
   |
15 |   def fun_with_params_no_docstring(a, b="""
   |  _______________________________________^
16 | |     not a
17 | | """ """docstring"""):
   | |___^
18 |       pass
   |
help: Replace double multiline quotes with single quotes
   |
14 |
   - def fun_with_params_no_docstring(a, b="""
15 + def fun_with_params_no_docstring(a, b='''
16 |     not a
   - """ """docstring"""):
17 + ''' """docstring"""):
18 |     pass
   |

Q001 [*] Double quote multiline found but single quotes preferred
  --> docstring_doubles_function.py:17:5
   |
15 | def fun_with_params_no_docstring(a, b="""
16 |     not a
17 | """ """docstring"""):
   |     ^^^^^^^^^^^^^^^
18 |     pass
   |
help: Replace double multiline quotes with single quotes
   |
16 |     not a
   - """ """docstring"""):
17 + """ '''docstring'''):
18 |     pass
   |

Q001 [*] Double quote multiline found but single quotes preferred
  --> docstring_doubles_function.py:22:5
   |
21 | def fun_with_params_no_docstring2(a, b=c[foo():], c=\
22 |     """ not a docstring """):
   |     ^^^^^^^^^^^^^^^^^^^^^^^
23 |     pass
   |
help: Replace double multiline quotes with single quotes
   |
21 | def fun_with_params_no_docstring2(a, b=c[foo():], c=\
   -     """ not a docstring """):
22 +     ''' not a docstring '''):
23 |     pass
   |
