Mercurial > hg
changeset 43683:7f51bc36194d
typing: suppress error of py2 encoding.strtolocal() and .strfromlocal()
I don't know how to conditionally get rid of these py2/py3 overloads from
.pyi file. Instead, this patch makes pytype ignore the false-positives:
line 271, in strtolocal: bad option in return type [bad-return-type]
Expected: bytes
Actually returned: str
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 16 Nov 2019 16:09:39 +0900 |
parents | 83a349aaeba3 |
children | 009c115eba95 |
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:34:47 2019 +0900 +++ b/mercurial/encoding.py Sat Nov 16 16:09:39 2019 +0900 @@ -268,11 +268,11 @@ def strtolocal(s): # type: (str) -> bytes - return s + return s # pytype: disable=bad-return-type def strfromlocal(s): # type: (bytes) -> str - return s + return s # pytype: disable=bad-return-type strmethod = pycompat.identity