changeset 43681:b65fcccd9100

typing: fix argument type of encoding.tolocal() and .fromutf8b() Fixes various pytype errors.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 16 Nov 2019 15:27:12 +0900
parents 3364a15f61f0
children 83a349aaeba3
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:10:41 2019 +0900
+++ b/mercurial/encoding.py	Sat Nov 16 15:27:12 2019 +0900
@@ -138,7 +138,7 @@
 
 
 def tolocal(s):
-    # type: (Text) -> bytes
+    # type: (bytes) -> bytes
     """
     Convert a string from internal UTF-8 to local encoding
 
@@ -648,7 +648,7 @@
 
 
 def fromutf8b(s):
-    # type: (Text) -> bytes
+    # type: (bytes) -> bytes
     '''Given a UTF-8b string, return a local, possibly-binary string.
 
     return the original binary string. This