summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2020-07-24 10:46:43 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2020-07-24 11:07:09 +0200
commit9b6ea15266e32b44f2075b30281a42c412d9dc33 (patch)
tree8305709ddebd7765f6c98871765f1aa154eadf67 /bin
parenta26a5bb71c32c1cf8c5ad4d2ef79f3ece5065a02 (diff)
Fix escaped sequences in regular expressions
Regression after commit bd96a6f7b7eb103f97bcd6eadc21908187e94dce, which changed meaning of these. Thanks Stephan! Change-Id: I43cb871de32bd01d98e9adbb6c20b4e3c88ce715 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99348 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/check-implementer-notes.py2
-rwxr-xr-xbin/find-unused-defines.py2
-rwxr-xr-xbin/find-unused-typedefs.py2
3 files changed, 3 insertions, 3 deletions
diff --git a/bin/check-implementer-notes.py b/bin/check-implementer-notes.py
index 234e447e7d19..e637563d2f86 100755
--- a/bin/check-implementer-notes.py
+++ b/bin/check-implementer-notes.py
@@ -11,7 +11,7 @@ wiki_pages = [
# get all commit hashes mentioned in implementer notes
wiki_commit_hashes = {}
-query = re.compile(r'\{\{commit\|(\\w+)\|\\w*\|\\w*\}\}', re.IGNORECASE)
+query = re.compile(r'\{\{commit\|(\w+)\|\w*\|\w*\}\}', re.IGNORECASE)
for page in wiki_pages:
r = http.request('GET', page)
data = json.loads(r.data.decode('utf-8'))
diff --git a/bin/find-unused-defines.py b/bin/find-unused-defines.py
index 6ac190c02638..aafcc3fec13c 100755
--- a/bin/find-unused-defines.py
+++ b/bin/find-unused-defines.py
@@ -99,7 +99,7 @@ def in_exclusion_set( a ):
return False;
# find defines, excluding the externals folder
-a = subprocess.Popen(r"git grep -hP '^#define\s+\w\w\w\w+\s*' -- \"[!e][!x][!t]*\" | sort -u", stdout=subprocess.PIPE, shell=True)
+a = subprocess.Popen("git grep -hP '^#define\\s+\\w\\w\\w\\w+\\s*' -- \"[!e][!x][!t]*\" | sort -u", stdout=subprocess.PIPE, shell=True)
name_re = re.compile(r"#define\s+(\w+)")
with a.stdout as txt:
diff --git a/bin/find-unused-typedefs.py b/bin/find-unused-typedefs.py
index bf88c83bc7bd..9a6c0eef9118 100755
--- a/bin/find-unused-typedefs.py
+++ b/bin/find-unused-typedefs.py
@@ -3,7 +3,7 @@
import subprocess
# find typedefs, excluding the externals folder
-a = subprocess.Popen(r"git grep -P 'typedef\s+.+\s+\w+;' -- \"[!e][!x][!t]*\"", stdout=subprocess.PIPE, shell=True)
+a = subprocess.Popen("git grep -P 'typedef\\s+.+\\s+\\w+;' -- \"[!e][!x][!t]*\"", stdout=subprocess.PIPE, shell=True)
# parse out the typedef names
typedefSet = set()