mirror of
https://github.com/ditkrg/todo-to-issue-action.git
synced 2026-01-22 22:06:43 +00:00
Merge pull request #271 from emmanuel-ferdman/master
fix: resolve regex library warnings
This commit is contained in:
commit
6b78d5bd9a
@ -363,11 +363,11 @@ class TodoParser(object):
|
|||||||
for i, issue in enumerate(issues):
|
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 some of the diff symbols so it can be included as a code snippet in the issue body.
|
||||||
# Strip removed lines.
|
# 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.
|
# 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.
|
# 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
|
issue.hunk = cleaned_hunk
|
||||||
|
|
||||||
return issues
|
return issues
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user