1
0
Fork 0

ci: Mark the regex to find chunks in code style checks as regex string

Fixes
    check-style.py:23: SyntaxWarning: invalid escape sequence '\+'
    check-style.py:24: SyntaxWarning: invalid escape sequence '\d'

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3454>
This commit is contained in:
Peter Hutterer 2023-12-15 11:49:44 +10:00 committed by Marge Bot
parent f76952e83f
commit 49f76f1295

View file

@ -20,8 +20,8 @@ def run_diff(sha):
return proc.stdout.strip().splitlines()
def find_chunks(diff):
file_entry_re = re.compile('^\+\+\+ b/(.*)$')
diff_chunk_re = re.compile('^@@ -\d+,\d+ \+(\d+),(\d+)')
file_entry_re = re.compile(r'^\+\+\+ b/(.*)$')
diff_chunk_re = re.compile(r'^@@ -\d+,\d+ \+(\d+),(\d+)')
file = None
chunks = []