From f8450c79c8e89ce879ffe1cb0bd2ca91db3d8416 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Fri, 28 Dec 2018 15:28:23 +0000 Subject: [PATCH] Fix pycodestyle "inalid escape sequence" warnings --- debian/bin/gencontrol.py | 2 +- debian/bin/kconfig.py | 2 +- debian/changelog | 1 + debian/rules.d/scripts/mod/gendef.py | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/debian/bin/gencontrol.py b/debian/bin/gencontrol.py index 4339727af..6a83146c4 100755 --- a/debian/bin/gencontrol.py +++ b/debian/bin/gencontrol.py @@ -624,7 +624,7 @@ class Gencontrol(Base): self.abiname_part = '-%s' % self.config['abi', ]['abiname'] # We need to keep at least three version components to avoid # userland breakage (e.g. #742226, #745984). - self.abiname_version = re.sub('^(\d+\.\d+)(?=-|$)', r'\1.0', + self.abiname_version = re.sub(r'^(\d+\.\d+)(?=-|$)', r'\1.0', self.version.linux_upstream) self.vars = { 'upstreamversion': self.version.linux_upstream, diff --git a/debian/bin/kconfig.py b/debian/bin/kconfig.py index b34f861ff..6115355f4 100755 --- a/debian/bin/kconfig.py +++ b/debian/bin/kconfig.py @@ -16,7 +16,7 @@ def merge(output, configs, overrides): def opt_callback_dict(option, opt, value, parser): - match = re.match('^\s*(\S+)=(\S+)\s*$', value) + match = re.match(r'^\s*(\S+)=(\S+)\s*$', value) if not match: raise optparse.OptionValueError('not key=value') dest = option.dest diff --git a/debian/changelog b/debian/changelog index de865641c..9625c4b08 100644 --- a/debian/changelog +++ b/debian/changelog @@ -15,6 +15,7 @@ linux (4.19.12-2) UNRELEASED; urgency=medium * debian/lib/python/debian_linux/debian.py: Fix deprecated import of MutableSet * Fix pycodestyle "line break after binary operator" warnings + * Fix pycodestyle "inalid escape sequence" warnings [ Salvatore Bonaccorso ] * USB: hso: Fix OOB memory access in hso_probe/hso_get_config_data diff --git a/debian/rules.d/scripts/mod/gendef.py b/debian/rules.d/scripts/mod/gendef.py index f923d083b..55d3fc60e 100755 --- a/debian/rules.d/scripts/mod/gendef.py +++ b/debian/rules.d/scripts/mod/gendef.py @@ -3,7 +3,7 @@ import re import sys for line in open(sys.argv[1]): - match = re.search('getopt\(argc, argv, "([\w:]*?)"\)', line) + match = re.search(r'getopt\(argc, argv, "([\w:]*?)"\)', line) if match: options = match.group(1) break