* [Buildroot] [git commit] utils/getdeveloperlib.py: use raw strings for re.compile/re.match
@ 2020-08-14 19:56 Thomas Petazzoni
2020-08-28 16:34 ` Peter Korsgaard
0 siblings, 1 reply; 2+ messages in thread
From: Thomas Petazzoni @ 2020-08-14 19:56 UTC (permalink / raw
To: buildroot
commit: https://git.buildroot.net/buildroot/commit/?id=c5b848d7192e615ead72419dcf5ce7286cf07a82
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master
Fixes the following Python 3.x flake8 warning:
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>
---
utils/getdeveloperlib.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/utils/getdeveloperlib.py b/utils/getdeveloperlib.py
index 239ffa340b..dc0cc07cc7 100644
--- a/utils/getdeveloperlib.py
+++ b/utils/getdeveloperlib.py
@@ -10,7 +10,7 @@ import unittest
# Patch parsing functions
#
-FIND_INFRA_IN_PATCH = re.compile("^\+\$\(eval \$\((host-)?([^-]*)-package\)\)$")
+FIND_INFRA_IN_PATCH = re.compile(r"^\+\$\(eval \$\((host-)?([^-]*)-package\)\)$")
def analyze_patch(patch):
@@ -33,7 +33,7 @@ def analyze_patch(patch):
return (files, infras)
-FIND_INFRA_IN_MK = re.compile("^\$\(eval \$\((host-)?([^-]*)-package\)\)$")
+FIND_INFRA_IN_MK = re.compile(r"^\$\(eval \$\((host-)?([^-]*)-package\)\)$")
def fname_get_package_infra(fname):
@@ -178,7 +178,7 @@ def parse_arches_from_config_in(fname):
parsing_arches = True
continue
if parsing_arches:
- m = re.match("^\s*default \"([^\"]*)\".*", line)
+ m = re.match(r"^\s*default \"([^\"]*)\".*", line)
if m:
arches.add(m.group(1))
else:
@@ -192,7 +192,7 @@ def parse_developer_architectures(fnames):
developer is working on."""
arches = set()
for fname in fnames:
- if not re.match("^.*/arch/Config\.in\..*$", fname):
+ if not re.match(r"^.*/arch/Config\.in\..*$", fname):
continue
arches = arches | parse_arches_from_config_in(fname)
return arches
@@ -201,7 +201,7 @@ def parse_developer_architectures(fnames):
def parse_developer_infras(fnames):
infras = set()
for fname in fnames:
- m = re.match("^package/pkg-([^.]*).mk$", fname)
+ m = re.match(r"^package/pkg-([^.]*).mk$", fname)
if m:
infras.add(m.group(1))
return infras
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Buildroot] [git commit] utils/getdeveloperlib.py: use raw strings for re.compile/re.match
2020-08-14 19:56 [Buildroot] [git commit] utils/getdeveloperlib.py: use raw strings for re.compile/re.match Thomas Petazzoni
@ 2020-08-28 16:34 ` Peter Korsgaard
0 siblings, 0 replies; 2+ messages in thread
From: Peter Korsgaard @ 2020-08-28 16:34 UTC (permalink / raw
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@bootlin.com> writes:
> commit: https://git.buildroot.net/buildroot/commit/?id=c5b848d7192e615ead72419dcf5ce7286cf07a82
> branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master
> Fixes the following Python 3.x flake8 warning:
> 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>
Committed to 2020.02.x and 2020.05.x, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-08-28 16:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-14 19:56 [Buildroot] [git commit] utils/getdeveloperlib.py: use raw strings for re.compile/re.match Thomas Petazzoni
2020-08-28 16:34 ` Peter Korsgaard
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.