]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
patchtest: test_metadata: fix invalid escape sequences
authorTrevor Gamblin <tgamblin@baylibre.com>
Tue, 9 Apr 2024 12:03:03 +0000 (08:03 -0400)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 23 Apr 2024 12:33:46 +0000 (13:33 +0100)
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\:\/\/.*')

Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
meta/lib/patchtest/tests/test_metadata.py

index be609dbd0488e17b5baba07fd0e54118a3333f4e..f5dbcf01ed63d3cfee58887b027e7705c2040c1d 100644 (file)
@@ -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'