mirror of
https://github.com/astral-sh/ruff
synced 2026-01-08 23:24:31 -05:00
Format implicit string continuation (#5328)
This commit is contained in:
@@ -60,3 +60,51 @@ String '"""
|
||||
'''Multiline
|
||||
String \"\"\"
|
||||
'''
|
||||
|
||||
# String continuation
|
||||
|
||||
"Let's" "start" "with" "a" "simple" "example"
|
||||
|
||||
"Let's" "start" "with" "a" "simple" "example" "now repeat after me:" "I am confident" "I am confident" "I am confident" "I am confident" "I am confident"
|
||||
|
||||
(
|
||||
"Let's" "start" "with" "a" "simple" "example" "now repeat after me:" "I am confident" "I am confident" "I am confident" "I am confident" "I am confident"
|
||||
)
|
||||
|
||||
if (
|
||||
a + "Let's"
|
||||
"start"
|
||||
"with"
|
||||
"a"
|
||||
"simple"
|
||||
"example"
|
||||
"now repeat after me:"
|
||||
"I am confident"
|
||||
"I am confident"
|
||||
"I am confident"
|
||||
"I am confident"
|
||||
"I am confident"
|
||||
):
|
||||
pass
|
||||
|
||||
if "Let's" "start" "with" "a" "simple" "example" "now repeat after me:" "I am confident" "I am confident" "I am confident" "I am confident" "I am confident":
|
||||
pass
|
||||
|
||||
(
|
||||
# leading
|
||||
"a" # trailing part commen
|
||||
|
||||
# leading part comment
|
||||
|
||||
"b" # trailing second part comment
|
||||
# trailing
|
||||
)
|
||||
|
||||
test_particular = [
|
||||
# squares
|
||||
'1.00000000100000000025',
|
||||
'1.0000000000000000000000000100000000000000000000000' #...
|
||||
'00025',
|
||||
'1.0000000000000000000000000000000000000000000010000' #...
|
||||
'0000000000000000000000000000000000000000025',
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user