Skip to content

Commit

Permalink
Updated new regexes to use raw strings.
Browse files Browse the repository at this point in the history
  • Loading branch information
workhorsy committed Nov 19, 2022
1 parent 663d94e commit f3f0fec
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cpuinfo/cpuinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -821,10 +821,10 @@ def _parse_arch(arch_string_raw):
arch = 'S390X'
bits = 64
# MIPS
elif re.match('^mips$', arch_string_raw):
elif re.match(r'^mips$', arch_string_raw):
arch = 'MIPS_32'
bits = 32
elif re.match('^mips64$', arch_string_raw):
elif re.match(r'^mips64$', arch_string_raw):
arch = 'MIPS_64'
bits = 64
# RISCV
Expand All @@ -835,10 +835,10 @@ def _parse_arch(arch_string_raw):
arch = 'RISCV_64'
bits = 64
# LoongArch
elif re.match('^loongarch32$', arch_string_raw):
elif re.match(r'^loongarch32$', arch_string_raw):
arch = 'LOONG_32'
bits = 32
elif re.match('^loongarch64$', arch_string_raw):
elif re.match(r'^loongarch64$', arch_string_raw):
arch = 'LOONG_64'
bits = 64

Expand Down

0 comments on commit f3f0fec

Please sign in to comment.