From: Ian Jackson Date: Sun, 14 Oct 2018 12:41:54 +0000 (+0100) Subject: Escape: Add missing r in regexp literals ('...' => r'...') [1] X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=78e3f7ee08d49e4ca6e9b015fcdfba0eb7aef704;p=git-buildpackage.git 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 --- 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)