From 815305b94864556c994934c7a7c830da7de1d94e Mon Sep 17 00:00:00 2001 From: Alexis Hildebrandt Date: Sun, 25 Feb 2024 17:40:19 +0100 Subject: Use Python raw strings for regex methods argument --- tools/genuuid | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tools/genuuid') diff --git a/tools/genuuid b/tools/genuuid index 0ad5bd92..784da6ac 100755 --- a/tools/genuuid +++ b/tools/genuuid @@ -8,15 +8,15 @@ def scan_path(path): try: with open(path, 'r') as fd: for line in fd: - match = re.match('\*', line) + match = re.match(r'\*', line) if match: bug = uuid = None - match = re.search('\[\[bug:([0-9]+)\]\[#[0-9]+\]\]', line) + match = re.search(r'\[\[bug:([0-9]+)\]\[#[0-9]+\]\]', line) if match: bug = match.group(1) elif bug: - match = re.search(':ID:\s+(.+?)\s*$', line) + match = re.search(r':ID:\s+(.+?)\s*$', line) if match: uuid = match.group(1) print(f"UPDATE bugs SET cf_uuid='{uuid}' WHERE bug_id={bug};") -- cgit v1.2.3