Mercurial > public > mercurial-scm > hg
diff mercurial/encoding.py @ 43787:be8552f25cab
cleanup: fix docstring formatting
This is just removing the b'' prefix (except demandimportpy2), and making sure
it is triple quoted. I skipped the mapping.py module in zope because that's 3rd
party code.
Differential Revision: https://phab.mercurial-scm.org/D7539
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Sun, 01 Dec 2019 18:46:10 -0500 |
parents | 7b14d649af1b |
children | 9d2b2df2c2ba |
line wrap: on
line diff
--- a/mercurial/encoding.py Wed Nov 13 20:42:13 2019 +0100 +++ b/mercurial/encoding.py Sun Dec 01 18:46:10 2019 -0500 @@ -312,13 +312,13 @@ def colwidth(s): # type: (bytes) -> int - b"Find the column width of a string for display in the local encoding" + """Find the column width of a string for display in the local encoding""" return ucolwidth(s.decode(_sysstr(encoding), 'replace')) def ucolwidth(d): # type: (Text) -> int - b"Find the column width of a Unicode string for display" + """Find the column width of a Unicode string for display""" eaw = getattr(unicodedata, 'east_asian_width', None) if eaw is not None: return sum([eaw(c) in _wide and 2 or 1 for c in d]) @@ -436,7 +436,7 @@ def lower(s): # type: (bytes) -> bytes - b"best-effort encoding-aware case-folding of local string s" + """best-effort encoding-aware case-folding of local string s""" try: return asciilower(s) except UnicodeDecodeError: @@ -459,7 +459,7 @@ def upper(s): # type: (bytes) -> bytes - b"best-effort encoding-aware case-folding of local string s" + """best-effort encoding-aware case-folding of local string s""" try: return asciiupper(s) except UnicodeDecodeError: