@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 70363bccfa
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 15, 14:45 UTC

Fix syntaxWarning: invalid escape sequence '\s' (#16532)

Signed-off-by: Jie Fu <jiefu@tencent.com>

Jie Fu (傅杰) committed Apr 12, 2025 at 22:39 UTC 70363bccfac1a6a0818ea577ad9cf8123a0ec3ae
1 file changed +2 -2
vllm/utils.py
+2 -2
@@ -1233,8 +1233,8 @@ class SortedHelpFormatter(ArgumentDefaultsHelpFormatter):
1233 3. Each line is wrapped to the specified width (width of terminal).
1234 """
1235 # 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*")
1238 text = single_newline.sub(' ', text)
1239 lines = re.split(multiple_newlines, text)
1240 return sum([textwrap.wrap(line, width) for line in lines], [])