Skip to contentSkip to conversation

patchtest: test_metadata: fix invalid escape sequences

PATCH New Trevor Gamblin 1 participant 1 message Apr 9, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 patchtest: test_metadata: fix invalid escape sequences

Clear up the following warnings seen during patchtest runs:

|/workspace/yocto/poky/meta/lib/patchtest/tests/test_metadata.py:21: SyntaxWarning: invalid escape sequence '\+'
|  add_mark = pyparsing.Regex('\+ ')
|/workspace/yocto/poky/meta/lib/patchtest/tests/test_metadata.py:26: SyntaxWarning: invalid escape sequence '\:'
|  git_regex = pyparsing.Regex('^git\:\/\/.*')
---
 meta/lib/patchtest/tests/test_metadata.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta/lib/patchtest/tests/test_metadata.py +2 -2
index be609dbd048..f5dbcf01ed6 100644
@@ -18,12 +18,12 @@ class TestMetadata(base.Metadata):
     lictag_re  = pyparsing.AtLineStart("License-Update:")
     lic_chksum_added = pyparsing.AtLineStart("+" + metadata_chksum)
     lic_chksum_removed = pyparsing.AtLineStart("-" + metadata_chksum)
-    add_mark = pyparsing.Regex('\+ ')
+    add_mark = pyparsing.Regex('\\+ ')
     max_length = 200
     metadata_src_uri  = 'SRC_URI'
     md5sum    = 'md5sum'
     sha256sum = 'sha256sum'
-    git_regex = pyparsing.Regex('^git\:\/\/.*')
+    git_regex = pyparsing.Regex('^git\\:\\/\\/.*')
     metadata_summary = 'SUMMARY'
     cve_check_ignore_var = 'CVE_CHECK_IGNORE'
     cve_status_var = 'CVE_STATUS'
Signature · 1 line
2.44.0