---
source: crates/ruff_python_formatter/tests/fixtures.rs
input_file: crates/ruff_python_formatter/resources/test/fixtures/ruff/quote_style.py
---
## Input
```python
'single' # this string is treated as a docstring
"double"
r'r single'
r"r double"
f'f single'
f"f double"
fr'fr single'
fr"fr double"
rf'rf single'
rf"rf double"
b'b single'
b"b double"
rb'rb single'
rb"rb double"
br'br single'
br"br double"

'''single triple'''
"""double triple"""
r'''r single triple'''
r"""r double triple"""
f'''f single triple'''
f"""f double triple"""
fr'''fr single triple'''
fr"""fr double triple"""
rf'''rf single triple'''
rf"""rf double triple"""
b'''b single triple'''
b"""b double triple"""
rb'''rb single triple'''
rb"""rb double triple"""
br'''br single triple'''
br"""br double triple"""

'single1' 'single2'
'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
### Output 1
```
indent-style               = space
line-width                 = 88
indent-width               = 4
quote-style                = Single
line-ending                = LineFeed
magic-trailing-comma       = Respect
docstring-code             = Disabled
docstring-code-line-width  = "dynamic"
preview                    = Disabled
target_version             = Py38
source_type                = Python
```

```python
"single"  # this string is treated as a docstring

'double'
r'r single'
r'r double'
f'f single'
f'f double'
rf'fr single'
rf'fr double'
rf'rf single'
rf'rf double'
b'b single'
b'b double'
rb'rb single'
rb'rb double'
rb'br single'
rb'br double'

"""single triple"""
"""double triple"""
r"""r single triple"""
r"""r double triple"""
f"""f single triple"""
f"""f double triple"""
rf"""fr single triple"""
rf"""fr double triple"""
rf"""rf single triple"""
rf"""rf double triple"""
b"""b single triple"""
b"""b double triple"""
rb"""rb single triple"""
rb"""rb double triple"""
rb"""br single triple"""
rb"""br double triple"""

'single1' 'single2'
'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"
```


### Output 2
```
indent-style               = space
line-width                 = 88
indent-width               = 4
quote-style                = Double
line-ending                = LineFeed
magic-trailing-comma       = Respect
docstring-code             = Disabled
docstring-code-line-width  = "dynamic"
preview                    = Disabled
target_version             = Py38
source_type                = Python
```

```python
"single"  # this string is treated as a docstring

"double"
r"r single"
r"r double"
f"f single"
f"f double"
rf"fr single"
rf"fr double"
rf"rf single"
rf"rf double"
b"b single"
b"b double"
rb"rb single"
rb"rb double"
rb"br single"
rb"br double"

"""single triple"""
"""double triple"""
r"""r single triple"""
r"""r double triple"""
f"""f single triple"""
f"""f double triple"""
rf"""fr single triple"""
rf"""fr double triple"""
rf"""rf single triple"""
rf"""rf double triple"""
b"""b single triple"""
b"""b double triple"""
rb"""rb single triple"""
rb"""rb double triple"""
rb"""br single triple"""
rb"""br double triple"""

"single1" "single2"
"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"
```


### Output 3
```
indent-style               = space
line-width                 = 88
indent-width               = 4
quote-style                = Preserve
line-ending                = LineFeed
magic-trailing-comma       = Respect
docstring-code             = Disabled
docstring-code-line-width  = "dynamic"
preview                    = Disabled
target_version             = Py38
source_type                = Python
```

```python
'single'  # this string is treated as a docstring

"double"
r'r single'
r"r double"
f'f single'
f"f double"
rf'fr single'
rf"fr double"
rf'rf single'
rf"rf double"
b'b single'
b"b double"
rb'rb single'
rb"rb double"
rb'br single'
rb"br double"

'''single triple'''
"""double triple"""
r'''r single triple'''
r"""r double triple"""
f'''f single triple'''
f"""f double triple"""
rf'''fr single triple'''
rf"""fr double triple"""
rf'''rf single triple'''
rf"""rf double triple"""
b'''b single triple'''
b"""b double triple"""
rb'''rb single triple'''
rb"""rb double triple"""
rb'''br single triple'''
rb"""br double triple"""

'single1' 'single2'
'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'
```



