Skip to content

Commit 985eef1

Browse files
resolve warnings
1 parent 74ab83e commit 985eef1

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

builder/actions/setup_cross_ci_helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ def _get_token_slots(env):
215215

216216
def _get_softhsm2_version(env):
217217
output = _exec_softhsm2_util(env, '--version').output
218-
match = re.match('([0-9+])\.([0-9]+).([0-9]+)', output)
218+
match = re.match(r'([0-9+])\.([0-9]+).([0-9]+)', output)
219219
return (int(match.group(1)), int(match.group(2)), int(match.group(3)))
220220

221221
################################################################################

builder/core/toolchain.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,19 @@ def _compiler_version(cc):
1717

1818
for text in lines:
1919
# Apple clang
20-
m = re.match('Apple (LLVM|clang) version (\d+)', text)
20+
m = re.match(r'Apple (LLVM|clang) version (\d+)', text)
2121
if m:
2222
return 'appleclang', m.group(2)
2323
# LLVM clang
24-
m = re.match('.*(LLVM|clang) version (\d+)', text)
24+
m = re.match(r'.*(LLVM|clang) version (\d+)', text)
2525
if m:
2626
return 'clang', m.group(2)
2727
# GCC 4.x
28-
m = re.match('gcc .+ (4\.\d+)', text)
28+
m = re.match(r'gcc .+ (4\.\d+)', text)
2929
if m:
3030
return 'gcc', m.group(1)
3131
# GCC 5+
32-
m = re.match('gcc .+ (\d+)\.', text)
32+
m = re.match(r'gcc .+ (\d+)\.', text)
3333
if m:
3434
return 'gcc', m.group(1)
3535
return None, None

builder/imports/llvm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def install(self, env):
130130
sudo = ['sudo'] if sudo else []
131131

132132
# Strip minor version info
133-
version = env.toolchain.compiler_version.replace('\..+', '')
133+
version = env.toolchain.compiler_version.replace(r'\..+', '')
134134

135135
script = tempfile.NamedTemporaryFile(delete=False)
136136
script_path = script.name

builder/imports/nodejs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
import re
1515

1616

17-
NVM = """\
17+
NVM = r"""\
1818
#!/usr/bin/env bash
1919
export NVM_DIR="$HOME/.nvm"
2020
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
@@ -126,7 +126,7 @@ def install_node_via_unofficial_build(self, env):
126126
# Normaliz version format, please note 12.16.3 is the last version has x86 support
127127
def normalize_version(v):
128128
append_times = 0
129-
while re.match('^([0-9]+\.){2}[0-9]+$', v) == None:
129+
while re.match(r'^([0-9]+\.){2}[0-9]+$', v) == None:
130130
# Only try append sub version twice
131131
if append_times < 2:
132132
v += ".0"

0 commit comments

Comments
 (0)