From 78e3f7ee08d49e4ca6e9b015fcdfba0eb7aef704 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 14 Oct 2018 13:41:54 +0100 Subject: [PATCH] Escape: Add missing r in regexp literals ('...' => r'...') [1] Detected by flake8, eg ./gbp/deb/git.py:35:6: W605 invalid escape sequence '\)' Signed-off-by: Ian Jackson --- gbp/git/repository.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gbp/git/repository.py b/gbp/git/repository.py index 2ff127d..617c172 100644 --- a/gbp/git/repository.py +++ b/gbp/git/repository.py @@ -1186,10 +1186,10 @@ class GitRepository(object): fetch_url = None push_urls = [] for line in out.decode().splitlines(): - match = re.match('\s*Fetch\s+URL:\s*(\S.*)', line) + match = re.match(r'\s*Fetch\s+URL:\s*(\S.*)', line) if match: fetch_url = match.group(1) - match = re.match('\s*Push\s+URL:\s*(\S.*)', line) + match = re.match(r'\s*Push\s+URL:\s*(\S.*)', line) if match: push_urls.append(match.group(1)) remotes[remote] = GitRemote(remote, fetch_url, push_urls) -- 2.30.2