Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
70363bcc
Unverified
Commit
70363bcc
authored
Apr 12, 2025
by
Jie Fu (傅杰)
Committed by
GitHub
Apr 12, 2025
Browse files
Fix syntaxWarning: invalid escape sequence '\s' (#16532)
Signed-off-by:
Jie Fu
<
jiefu@tencent.com
>
parent
3cdc5766
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
vllm/utils.py
vllm/utils.py
+2
-2
No files found.
vllm/utils.py
View file @
70363bcc
...
...
@@ -1233,8 +1233,8 @@ class SortedHelpFormatter(ArgumentDefaultsHelpFormatter):
3. Each line is wrapped to the specified width (width of terminal).
"""
# The patterns also include whitespace after the newline
single_newline
=
re
.
compile
(
"(?<!
\n
)
\n
(?!
\n
)\s*"
)
multiple_newlines
=
re
.
compile
(
"
\n
{2,}\s*"
)
single_newline
=
re
.
compile
(
r
"(?<!\n)\n(?!\n)\s*"
)
multiple_newlines
=
re
.
compile
(
r
"\n{2,}\s*"
)
text
=
single_newline
.
sub
(
' '
,
text
)
lines
=
re
.
split
(
multiple_newlines
,
text
)
return
sum
([
textwrap
.
wrap
(
line
,
width
)
for
line
in
lines
],
[])
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment