chiark / gitweb /
Escape: Add two missing doublings of \ in some docstrings.
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 14 Oct 2018 12:50:41 +0000 (13:50 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 14 Oct 2018 14:17:27 +0000 (15:17 +0100)
commitc8972cf19d01aaf6c162f7089bbedd15b86c47b7
tree57cab39ad844142806515d4ce771fdb110a2f283
parent05743dca6496336b43cf96481b324af1f23fa64a
Escape: Add two missing doublings of \ in some docstrings.

The \\\\ in the source text inside """...""" turn into \\:

 >>> print("""
 ...  >>> DebianGitRepository.version_to_tag("%(version%-%\\\\%)s", "0-1.2.3")
 ... """)

  >>> DebianGitRepository.version_to_tag("%(version%-%\\%)s", "0-1.2.3")

 >>>

The \\ inside the quoted source text turn into \ when received by
version_to_tag.

Detected by flake8:
  ./gbp/deb/git.py:171:-37: W605 invalid escape sequence '\%'

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
gbp/deb/git.py