From f9d9b106df10296ce90728be9e56008809eb06bd Mon Sep 17 00:00:00 2001 From: Wade Fife Date: Wed, 2 Apr 2025 16:04:46 -0500 Subject: [PATCH] fpga: tools: Fix escape sequence warnings This adds to 11c60ee to fix a few additional escape sequence warnings. Original-commit: 9dc2e089d86e395cb144360fa096ed007b605b9f --- tools/scripts/viv_ip_retarget_subcores.py | 9 ++++++--- tools/scripts/viv_ip_xci_editor.py | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/tools/scripts/viv_ip_retarget_subcores.py b/tools/scripts/viv_ip_retarget_subcores.py index 27bfba9..f8c4a91 100644 --- a/tools/scripts/viv_ip_retarget_subcores.py +++ b/tools/scripts/viv_ip_retarget_subcores.py @@ -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 ( - '(.*\)(.+)(\)' + + r'"\>)(.+)(\)' ) def get_empty_match_str(item): """Produce the string to an XML parameter without a value.""" return ( - '(.*\' + r'(.*\' ) diff --git a/tools/scripts/viv_ip_xci_editor.py b/tools/scripts/viv_ip_xci_editor.py index 96bc040..2dd6786 100644 --- a/tools/scripts/viv_ip_xci_editor.py +++ b/tools/scripts/viv_ip_xci_editor.py @@ -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 + "\>)(.+)(\)" + return r"(.*\<" + tag_text + r"\>)(.+)(\)" def get_match_str(item):