Skip to content

Commit 70363bc

Browse files
authored
Fix syntaxWarning: invalid escape sequence '\s' (#16532)
Signed-off-by: Jie Fu <jiefu@tencent.com>
1 parent 3cdc576 commit 70363bc

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)