diff --git a/crates/ruff_python_formatter/resources/test/fixtures/ruff/quote_style.py b/crates/ruff_python_formatter/resources/test/fixtures/ruff/quote_style.py index b08ed0d2ef74f..8f0d159bebd4a 100644 --- a/crates/ruff_python_formatter/resources/test/fixtures/ruff/quote_style.py +++ b/crates/ruff_python_formatter/resources/test/fixtures/ruff/quote_style.py @@ -36,3 +36,15 @@ 'single1' "double2" "double1" 'single2' "double1" "double2" + +def docstring_single_triple(): + '''single triple''' + +def docstring_double_triple(): + """double triple""" + +def docstring_double(): + "double triple" + +def docstring_single(): + 'single' diff --git a/crates/ruff_python_formatter/tests/snapshots/format@quote_style.py.snap b/crates/ruff_python_formatter/tests/snapshots/format@quote_style.py.snap index 9db281d6dfd26..b78c7666e9636 100644 --- a/crates/ruff_python_formatter/tests/snapshots/format@quote_style.py.snap +++ b/crates/ruff_python_formatter/tests/snapshots/format@quote_style.py.snap @@ -42,6 +42,18 @@ br"""br double triple""" 'single1' "double2" "double1" 'single2' "double1" "double2" + +def docstring_single_triple(): + '''single triple''' + +def docstring_double_triple(): + """double triple""" + +def docstring_double(): + "double triple" + +def docstring_single(): + 'single' ``` ## Outputs @@ -96,6 +108,22 @@ rb"""br double triple""" 'single1' 'double2' 'double1' 'single2' 'double1' 'double2' + + +def docstring_single_triple(): + """single triple""" + + +def docstring_double_triple(): + """double triple""" + + +def docstring_double(): + "double triple" + + +def docstring_single(): + "single" ``` @@ -150,6 +178,22 @@ rb"""br double triple""" "single1" "double2" "double1" "single2" "double1" "double2" + + +def docstring_single_triple(): + """single triple""" + + +def docstring_double_triple(): + """double triple""" + + +def docstring_double(): + "double triple" + + +def docstring_single(): + "single" ``` @@ -204,6 +248,22 @@ rb"""br double triple""" 'single1' "double2" "double1" 'single2' "double1" "double2" + + +def docstring_single_triple(): + """single triple""" + + +def docstring_double_triple(): + """double triple""" + + +def docstring_double(): + "double triple" + + +def docstring_single(): + "single" ```