diff options
author | Joey Vagedes via groups.io <joeyvagedes=microsoft.com@groups.io> | 2023-12-06 12:27:02 -0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2023-12-21 00:33:31 +0000 |
commit | 9f0061a03b61d282fbc0ba5be22155d06a5e64a1 (patch) | |
tree | 18a4fe05d2d43b7762bc70842790bacd3a3296ec /BaseTools/Source/Python/AutoGen/ModuleAutoGen.py | |
parent | 89705ad6c6342e3bd635bed89608e25f74372600 (diff) | |
download | edk2-9f0061a03b61d282fbc0ba5be22155d06a5e64a1.tar.gz edk2-9f0061a03b61d282fbc0ba5be22155d06a5e64a1.tar.bz2 edk2-9f0061a03b61d282fbc0ba5be22155d06a5e64a1.zip |
BaseTools: Resolve regex syntax warnings
Switches regex patterns to raw text to resolve python 3.12 syntax
warnings in regards to invalid escape sequences, as is suggested by the
re (regex) module in python.
Cc: Rebecca Cran <rebecca@bsdio.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Signed-off-by: Joey Vagedes <joey.vagedes@gmail.com>
Reviewed-by: Rebecca Cran <rebecca@bsdio.com>
Diffstat (limited to 'BaseTools/Source/Python/AutoGen/ModuleAutoGen.py')
-rwxr-xr-x | BaseTools/Source/Python/AutoGen/ModuleAutoGen.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/BaseTools/Source/Python/AutoGen/ModuleAutoGen.py b/BaseTools/Source/Python/AutoGen/ModuleAutoGen.py index d05410b329..65a2176ca9 100755 --- a/BaseTools/Source/Python/AutoGen/ModuleAutoGen.py +++ b/BaseTools/Source/Python/AutoGen/ModuleAutoGen.py @@ -51,12 +51,12 @@ gInfSpecVersion = "0x00010017" #
# Match name = variable
#
-gEfiVarStoreNamePattern = re.compile("\s*name\s*=\s*(\w+)")
+gEfiVarStoreNamePattern = re.compile(r"\s*name\s*=\s*(\w+)")
#
# The format of guid in efivarstore statement likes following and must be correct:
# guid = {0xA04A27f4, 0xDF00, 0x4D42, {0xB5, 0x52, 0x39, 0x51, 0x13, 0x02, 0x11, 0x3D}}
#
-gEfiVarStoreGuidPattern = re.compile("\s*guid\s*=\s*({.*?{.*?}\s*})")
+gEfiVarStoreGuidPattern = re.compile(r"\s*guid\s*=\s*({.*?{.*?}\s*})")
#
# Template string to generic AsBuilt INF
|