fpga: tools: Fix escape sequence warnings

This adds to 11c60ee to fix a few additional escape sequence warnings.


Original-commit: 9dc2e089d86e395cb144360fa096ed007b605b9f
This commit is contained in:
Wade Fife
2025-04-03 09:51:54 +02:00
committed by Jörg Hofrichter
parent d742b4018f
commit f9d9b106df
2 changed files with 7 additions and 4 deletions
+6 -3
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'")/\>'
)
+1 -1
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):