utils/{check-package, checkpackagelib}: consistently use raw strings for re.compile

Raw strings need to be used when calling re.compile() otherwise Python
3.x flake8 complains with:

W605 invalid escape sequence '\s'

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Reviewed-by: Titouan Christophe <titouan.christophe@railnova.eu>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
Thomas Petazzoni
2020-08-12 16:28:59 +02:00
parent 079c7d238e
commit 163f160a8e
4 changed files with 52 additions and 52 deletions

View File

@@ -152,8 +152,8 @@ class CommentsMenusPackagesOrder(_CheckFunction):
class HelpText(_CheckFunction):
HELP_TEXT_FORMAT = re.compile("^\t .{,62}$")
URL_ONLY = re.compile("^(http|https|git)://\S*$")
HELP_TEXT_FORMAT = re.compile(r"^\t .{,62}$")
URL_ONLY = re.compile(r"^(http|https|git)://\S*$")
def before(self):
self.help_text = False