mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-21 02:50:52 +00:00

## Summary Addresses https://github.com/astral-sh/ruff/issues/8402#issuecomment-1788782750 ## Test Plan Added associated test
26 lines
386 B
Python
26 lines
386 B
Python
def with_backslash():
|
|
"""Sum\\mary."""
|
|
|
|
|
|
def ends_in_quote():
|
|
'Sum\\mary."'
|
|
|
|
|
|
def contains_quote():
|
|
'Sum"\\mary.'
|
|
|
|
|
|
# OK
|
|
def contains_triples(t):
|
|
"""('''|\""")"""
|
|
|
|
|
|
# OK
|
|
def contains_triples(t):
|
|
'''(\'''|""")'''
|
|
|
|
|
|
# TODO: here should raise D300 for using dobule quotes instead,
|
|
# because escaped double quote does allow us.
|
|
def contains_triples(t):
|
|
'''(\""")'''
|