Skip to content

Commit 893f61d

Browse files
DamonFoolyangw-dev
authored andcommitted
Fix syntaxWarning: invalid escape sequence '\s' (vllm-project#16532)
Signed-off-by: Jie Fu <[email protected]> Signed-off-by: Yang Wang <[email protected]>
1 parent b5d43ec commit 893f61d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

vllm/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1233,8 +1233,8 @@ def _split_lines(self, text, width):
12331233
3. Each line is wrapped to the specified width (width of terminal).
12341234
"""
12351235
# The patterns also include whitespace after the newline
1236-
single_newline = re.compile("(?<!\n)\n(?!\n)\s*")
1237-
multiple_newlines = re.compile("\n{2,}\s*")
1236+
single_newline = re.compile(r"(?<!\n)\n(?!\n)\s*")
1237+
multiple_newlines = re.compile(r"\n{2,}\s*")
12381238
text = single_newline.sub(' ', text)
12391239
lines = re.split(multiple_newlines, text)
12401240
return sum([textwrap.wrap(line, width) for line in lines], [])

0 commit comments

Comments
 (0)