From 7c2b2763b1b234b9c0aff543013eb16ccb4ab1e3 Mon Sep 17 00:00:00 2001 From: Emmanuel Ferdman Date: Fri, 6 Jun 2025 10:19:19 -0700 Subject: [PATCH] Resolve regex library warnings Signed-off-by: Emmanuel Ferdman --- TodoParser.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/TodoParser.py b/TodoParser.py index 1aa3be8..8161aec 100644 --- a/TodoParser.py +++ b/TodoParser.py @@ -363,11 +363,11 @@ class TodoParser(object): for i, issue in enumerate(issues): # Strip some of the diff symbols so it can be included as a code snippet in the issue body. # Strip removed lines. - cleaned_hunk = re.sub(r'\n^-.*$', '', issue.hunk, 0, re.MULTILINE) + cleaned_hunk = re.sub(r'\n^-.*$', '', issue.hunk, count=0, flags=re.MULTILINE) # Strip leading symbols/whitespace. - cleaned_hunk = re.sub(r'^.', '', cleaned_hunk, 0, re.MULTILINE) + cleaned_hunk = re.sub(r'^.', '', cleaned_hunk, count=0, flags=re.MULTILINE) # Strip newline message. - cleaned_hunk = re.sub(r'\n\sNo newline at end of file', '', cleaned_hunk, 0, re.MULTILINE) + cleaned_hunk = re.sub(r'\n\sNo newline at end of file', '', cleaned_hunk, count=0, flags=re.MULTILINE) issue.hunk = cleaned_hunk return issues