Skip to content

Commit f80e93d

Browse files
josuskydanielleadams
authored andcommitted
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

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎tools/getsharedopensslhasquic.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def get_has_quic(include_path):
1414
exceptOSError:
1515
returnFalse
1616

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

1919
forlineinf:
2020
if (re.match(regex, line)):

‎tools/js2c.py‎

Lines changed: 1 addition & 1 deletion
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‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
importre
44
importos
55

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

0 commit comments

Comments
 (0)