Skip to content

Commit 16e9fe6

Browse files
committed
fix a few regexps that are better as raw strings
1 parent 2854dbe commit 16e9fe6

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

tools/ci_fetch_deps.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
def _git_version():
1313
version_str = subprocess.check_output(["git", "--version"], encoding="ascii", errors="replace")
14-
version_str = re.search("([0-9]\.*)*[0-9]", version_str).group(0)
14+
version_str = re.search(r"([0-9]\.*)*[0-9]", version_str).group(0)
1515
return tuple(int(part) for part in version_str.split("."))
1616

1717

tools/fwsizes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
for fn in os.listdir():
99
if os.path.isfile(fn) and ("build-arm " in fn or "build-riscv " in fn):
10-
board = re.split("[()]", fn)[1]
10+
board = re.split(r"[()]", fn)[1]
1111
if board in (
1212
"spresense",
1313
"teensy40",

tools/gen_ld_files.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
defines = {}
2929

3030
#
31-
REMOVE_UL_RE = re.compile("([0-9]+)UL")
31+
REMOVE_UL_RE = re.compile(r"([0-9]+)UL")
3232

3333

3434
def remove_UL(s):

tools/hci_trace_to_pcap.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
with open(sys.argv[1], "r") as f:
6767
for line in f:
6868
line = line.strip()
69-
m = re.match("([<>]) \\[ *([0-9]+)\\] ([A-Fa-f0-9:]+)", line)
69+
m = re.match(r"([<>]) \[ *([0-9]+)\] ([A-Fa-f0-9:]+)", line)
7070
if not m:
7171
continue
7272

0 commit comments

Comments
 (0)