Skip to content

Commit

Permalink
tools: fix regex strings in Python tools
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
josusky authored and danielleadams committed Apr 5, 2023
1 parent a384dd4 commit f80e93d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tools/getsharedopensslhasquic.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def get_has_quic(include_path):
except OSError:
return False

regex = '^#\s*define OPENSSL_INFO_QUIC'
regex = r'^#\s*define OPENSSL_INFO_QUIC'

for line in f:
if (re.match(regex, line)):
Expand Down
2 changes: 1 addition & 1 deletion tools/js2c.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def ReadFile(filename):

CONFIG_GYPI_ID = 'config_raw'

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

is_verbose = False

Expand Down
2 changes: 1 addition & 1 deletion tools/v8_gypfiles/GN-scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import re
import os

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

0 comments on commit f80e93d

Please sign in to comment.