Skip to content

Commit f80e93d

Browse files
josuskydanielleadams
authored andcommittedApr 5, 2023
tools: fix regex strings in Python tools
PR-URL: #46671 Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
1 parent a384dd4 commit f80e93d

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed
 

‎tools/getsharedopensslhasquic.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def get_has_quic(include_path):
1414
except OSError:
1515
return False
1616

17-
regex = '^#\s*define OPENSSL_INFO_QUIC'
17+
regex = r'^#\s*define OPENSSL_INFO_QUIC'
1818

1919
for line in f:
2020
if (re.match(regex, line)):

‎tools/js2c.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def ReadFile(filename):
8686

8787
CONFIG_GYPI_ID = 'config_raw'
8888

89-
SLUGGER_RE =re.compile('[.\-/]')
89+
SLUGGER_RE = re.compile(r'[.\-/]')
9090

9191
is_verbose = False
9292

‎tools/v8_gypfiles/GN-scraper.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import re
44
import os
55

6-
PLAIN_SOURCE_RE = re.compile('\s*"([^/$].+)"\s*')
6+
PLAIN_SOURCE_RE = re.compile(r'\s*"([^/$].+)"\s*')
77
def DoMain(args):
88
gn_filename, pattern = args
99
src_root = os.path.dirname(gn_filename)

0 commit comments

Comments
 (0)
Please sign in to comment.