ruff: Fix B034 re.split, re.sub should pass keyword arguments.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit d87eea1a67)
This commit is contained in:
Anders Kaseorg
2023-07-19 14:09:25 -07:00
committed by Alex Vandiver
parent 8fdcadb08a
commit 948171a839
4 changed files with 6 additions and 4 deletions

View File

@@ -89,7 +89,9 @@ def get_issue_created_event_body(payload: WildValue, include_title: bool) -> str
# Filter out multiline hidden comments
if description:
stringified_description = description.tame(check_string)
stringified_description = re.sub("<!--.*?-->", "", stringified_description, 0, re.DOTALL)
stringified_description = re.sub(
"<!--.*?-->", "", stringified_description, count=0, flags=re.DOTALL
)
stringified_description = stringified_description.rstrip()
else:
stringified_description = None