From 923452b788d94caea4d12592b87aa4836b164ca9 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Sun, 5 May 2024 11:47:31 -0400 Subject: [PATCH] Use raw string for regex patterns in python scripts Related issue: https://github.com/uBlockOrigin/uBlock-issues/issues/3229 --- tools/make-chromium-meta.py | 2 +- tools/make-firefox-meta.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/make-chromium-meta.py b/tools/make-chromium-meta.py index 319b7a1d730ca..5388e50f56f16 100644 --- a/tools/make-chromium-meta.py +++ b/tools/make-chromium-meta.py @@ -23,7 +23,7 @@ manifest_out['version'] = version # Development build? If so, modify name accordingly. -match = re.search('^\d+\.\d+\.\d+\.\d+$', version) +match = re.search(r'^\d+\.\d+\.\d+\.\d+$', version) if match: manifest_out['name'] += ' development build' manifest_out['short_name'] += ' dev build' diff --git a/tools/make-firefox-meta.py b/tools/make-firefox-meta.py index fa4ed71078d90..e10f91065b0a5 100644 --- a/tools/make-firefox-meta.py +++ b/tools/make-firefox-meta.py @@ -21,7 +21,7 @@ firefox_manifest = json.load(f2) if 'sidebar_action' in firefox_manifest: - match = re.search('^(\d+\.\d+\.\d+)(\.\d+)$', version) + match = re.search(r'^(\d+\.\d+\.\d+)(\.\d+)$', version) if not match: # https://bugzilla.mozilla.org/show_bug.cgi?id=1459007 # By design Firefox opens the sidebar with new installation of