From 49f76f129531167ba899e76fdb5ee01f8c6a1d0b Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 15 Dec 2023 11:49:44 +1000 Subject: [PATCH] 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: --- check-style.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/check-style.py b/check-style.py index 00aa2695a..091f59bcb 100755 --- a/check-style.py +++ b/check-style.py @@ -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 = []