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

@@ -46,24 +46,24 @@ def parse_args():
return parser.parse_args()
CONFIG_IN_FILENAME = re.compile("Config\.\S*$")
DO_CHECK_INTREE = re.compile("|".join([
"Config.in",
"arch/",
"boot/",
"fs/",
"linux/",
"package/",
"system/",
"toolchain/",
CONFIG_IN_FILENAME = re.compile(r"Config\.\S*$")
DO_CHECK_INTREE = re.compile(r"|".join([
r"Config.in",
r"arch/",
r"boot/",
r"fs/",
r"linux/",
r"package/",
r"system/",
r"toolchain/",
]))
DO_NOT_CHECK_INTREE = re.compile("|".join([
"boot/barebox/barebox\.mk$",
"fs/common\.mk$",
"package/doc-asciidoc\.mk$",
"package/pkg-\S*\.mk$",
"toolchain/helpers\.mk$",
"toolchain/toolchain-external/pkg-toolchain-external\.mk$",
DO_NOT_CHECK_INTREE = re.compile(r"|".join([
r"boot/barebox/barebox\.mk$",
r"fs/common\.mk$",
r"package/doc-asciidoc\.mk$",
r"package/pkg-\S*\.mk$",
r"toolchain/helpers\.mk$",
r"toolchain/toolchain-external/pkg-toolchain-external\.mk$",
]))