Skip to content

Commit

Permalink
[ci] lint: add maxsplit key for re.split (ray-project#45873)
Browse files Browse the repository at this point in the history
lint says it is recommended and less confusing

Signed-off-by: Lonnie Liu <[email protected]>
  • Loading branch information
aslonnie authored Jun 12, 2024
1 parent a58b42a commit 7f4c354
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ci/run/bazel.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def textproto_split(input_lines, json_encoder):
prev_comma = False
prev_tail = b""
for full_line in input_lines:
pieces = re.split(b"(\\r|\\n)", full_line, 1)
pieces = re.split(b"(\\r|\\n)", full_line, maxsplit=1)
pieces[1:] = [b"".join(pieces[1:])]
[line, tail] = pieces
next_line = pat_open.sub(b'\\1["\\2",\\3[', line)
Expand Down

0 comments on commit 7f4c354

Please sign in to comment.