Mercurial > hg
changeset 43682:83a349aaeba3
typing: constrain argument/return types of encoding.toutf8b()
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 16 Nov 2019 15:34:47 +0900 |
parents | b65fcccd9100 |
children | 7f51bc36194d |
files | mercurial/encoding.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/encoding.py Sat Nov 16 15:27:12 2019 +0900 +++ b/mercurial/encoding.py Sat Nov 16 15:34:47 2019 +0900 @@ -560,7 +560,7 @@ def getutf8char(s, pos): - # type: (Any, Any) -> Any + # type: (bytes, int) -> bytes '''get the next full utf-8 character in the given string, starting at pos Raises a UnicodeError if the given location does not start a valid @@ -579,7 +579,7 @@ def toutf8b(s): - # type: (Any) -> Any + # type: (bytes) -> bytes '''convert a local, possibly-binary string into UTF-8b This is intended as a generic method to preserve data when working