build: fix python warnings "SyntaxWarning: invalid escape sequence '\w'" (#44650)

* fix: SyntaxWarning: invalid escape sequence '\w'

* chore: remove some unused imports

* fix: E711 warning 'Comparison to  should be '
This commit is contained in:
Charles Kerr
2024-11-14 05:27:20 -06:00
committed by GitHub
parent 41b5d7e312
commit 8a67e77f03
3 changed files with 4 additions and 5 deletions

View File

@@ -6,7 +6,6 @@ import pprint
import re
import subprocess
import sys
from lib.config import get_target_arch
ELECTRON_DIR = os.path.abspath(os.path.join(__file__, '..', '..'))
NODE_DIR = os.path.join(ELECTRON_DIR, '..', 'third_party', 'electron_node')
@@ -40,8 +39,8 @@ def read_electron_args():
for line in file_in:
if line.startswith('#'):
continue
m = re.match('(\w+) = (.+)', line)
if m == None:
m = re.match(r'(\w+) = (.+)', line)
if m is None:
continue
args[m.group(1)] = m.group(2)
return args