typing: fix argument type of encoding.tolocal() and .fromutf8b()
authorYuya Nishihara <yuya@tcha.org>
Sat, 16 Nov 2019 15:27:12 +0900
changeset 43681 b65fcccd9100
parent 43680 3364a15f61f0
child 43682 83a349aaeba3
typing: fix argument type of encoding.tolocal() and .fromutf8b() Fixes various pytype errors.
mercurial/encoding.py
--- 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