fpga: tools: Fix escape sequence warnings

This adds to 11c60ee to fix a few additional escape sequence warnings.
This commit is contained in:
Wade Fife 2025-04-02 16:04:46 -05:00 committed by Jörg Hofrichter
parent 4ed588ab3c
commit 9dc2e089d8
2 changed files with 7 additions and 4 deletions

View File

@ -15,6 +15,7 @@ import os
import re
import sys
# Parse command line options
def get_options():
"""Parse script arguments."""
@ -55,16 +56,18 @@ def get_options():
def get_match_str(item):
"""Produce the string to an XML parameter with a value."""
return (
'(.*\<spirit:configurableElementValue spirit:referenceId=".*\.'
r'(.*\<spirit:configurableElementValue spirit:referenceId=".*\.'
+ item
+ '"\>)(.+)(\</spirit:configurableElementValue\>)'
+ r'"\>)(.+)(\</spirit:configurableElementValue\>)'
)
def get_empty_match_str(item):
"""Produce the string to an XML parameter without a value."""
return (
'(.*\<spirit:configurableElementValue spirit:referenceId=".*\.' + item + '")/\>'
r'(.*\<spirit:configurableElementValue spirit:referenceId=".*\.'
+ item
+ r'")/\>'
)

View File

@ -52,7 +52,7 @@ def parse_args():
def get_top_level_match_str(tag_text):
"""Get the regex string to match a top-level tag."""
return r"(.*\<" + tag_text + "\>)(.+)(\</" + tag_text + r"\>)"
return r"(.*\<" + tag_text + r"\>)(.+)(\</" + tag_text + r"\>)"
def get_match_str(item):