mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-03 18:28:24 +00:00
Format implicit string continuation (#5328)
This commit is contained in:
parent
313711aaf9
commit
49cabca3e7
9 changed files with 443 additions and 60 deletions
|
@ -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',
|
||||
]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue