Skip to content

Commit

Permalink
Eliminate SyntaxWarning: invalid escape sequence '\s'
Browse files Browse the repository at this point in the history
Signed-off-by: xyyy1420 <xyyy1420@gmail.com>
  • Loading branch information
xyyy1420 committed Jul 14, 2024
1 parent 479cdca commit 4dcca1c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ def create_inst_dict(file_filter, include_pseudo=False, include_pseudo_ops=[]):
# extension. Else throw error.
found = False
for oline in open(ext_file):
if not re.findall(f'^\s*{orig_inst}\s+',oline):
if not re.findall(f'^\\s*{orig_inst}\\s+',oline):
continue
else:
found = True
Expand Down Expand Up @@ -382,7 +382,7 @@ def create_inst_dict(file_filter, include_pseudo=False, include_pseudo_ops=[]):
# extension. Else throw error.
found = False
for oline in open(ext_file):
if not re.findall(f'^\s*{reg_instr}\s+',oline):
if not re.findall(f'^\\s*{reg_instr}\\s+',oline):
continue
else:
found = True
Expand Down

0 comments on commit 4dcca1c

Please sign in to comment.