-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
52dc57e
commit ae9cadf
Showing
22 changed files
with
632 additions
and
344 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
crates/ruff_python_formatter/resources/test/fixtures/ruff/expression/string.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
"' test" | ||
'" test' | ||
|
||
"\" test" | ||
'\' test' | ||
|
||
# Prefer single quotes for string with more double quotes | ||
"' \" \" '' \" \" '" | ||
|
||
# Prefer double quotes for string with more single quotes | ||
'\' " " \'\' " " \'' | ||
|
||
# Prefer double quotes for string with equal amount of single and double quotes | ||
'" \' " " \'\'' | ||
"' \" '' \" \" '" | ||
|
||
"\\' \"\"" | ||
'\\\' ""' | ||
|
||
|
||
u"Test" | ||
U"Test" | ||
|
||
r"Test" | ||
R"Test" | ||
|
||
'This string will not include \ | ||
backslashes or newline characters.' | ||
|
||
if True: | ||
'This string will not include \ | ||
backslashes or newline characters.' | ||
|
||
"""Multiline | ||
String \" | ||
""" | ||
|
||
'''Multiline | ||
String \' | ||
''' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.