Skip to content

Commit f3f0fec

Browse files
committed
Updated new regexes to use raw strings.
1 parent 663d94e commit f3f0fec

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cpuinfo/cpuinfo.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -821,10 +821,10 @@ def _parse_arch(arch_string_raw):
821821
arch = 'S390X'
822822
bits = 64
823823
# MIPS
824-
elif re.match('^mips$', arch_string_raw):
824+
elif re.match(r'^mips$', arch_string_raw):
825825
arch = 'MIPS_32'
826826
bits = 32
827-
elif re.match('^mips64$', arch_string_raw):
827+
elif re.match(r'^mips64$', arch_string_raw):
828828
arch = 'MIPS_64'
829829
bits = 64
830830
# RISCV
@@ -835,10 +835,10 @@ def _parse_arch(arch_string_raw):
835835
arch = 'RISCV_64'
836836
bits = 64
837837
# LoongArch
838-
elif re.match('^loongarch32$', arch_string_raw):
838+
elif re.match(r'^loongarch32$', arch_string_raw):
839839
arch = 'LOONG_32'
840840
bits = 32
841-
elif re.match('^loongarch64$', arch_string_raw):
841+
elif re.match(r'^loongarch64$', arch_string_raw):
842842
arch = 'LOONG_64'
843843
bits = 64
844844

0 commit comments

Comments
 (0)