chiark
/
gitweb
/
~ianmdlvl
/
git-buildpackage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d9efb7c
)
Escape: Add missing r in regexp literals ('...' => r'...') [4]
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sun, 14 Oct 2018 12:55:13 +0000
(13:55 +0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sun, 14 Oct 2018 14:17:27 +0000
(15:17 +0100)
Detected by flake8, eg
./gbp/deb/git.py:35:6: W605 invalid escape sequence '\)'
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
gbp/deb/git.py
patch
|
blob
|
history
diff --git
a/gbp/deb/git.py
b/gbp/deb/git.py
index 20c3005918ac12fe803634ae33483203bf18f403..82723856840066bbd2fe732ceca398622a0a3af2 100644
(file)
--- a/
gbp/deb/git.py
+++ b/
gbp/deb/git.py
@@
-231,7
+231,7
@@
class DebianGitRepository(PkgGitRepository):
>>> DebianGitRepository._sanitize_version("0.lock")
'0.#lock'
"""
- v = re.sub('\.(?=\.|$|lock$)', '.#', version)
+ v = re.sub(
r
'\.(?=\.|$|lock$)', '.#', version)
return v.replace('~', '_').replace(':', '%')
@staticmethod