[PATCH 6 of 7] typing: fix argument type of encoding.localstr()
Yuya Nishihara
yuya at tcha.org
Sat Nov 16 06:59:42 EST 2019
# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1573885489 -32400
# Sat Nov 16 15:24:49 2019 +0900
# Node ID e958a138ca580a7ab1565df30e3737dbf04a5a34
# Parent e4db6b41230a04e20c67d87fc97ff90151369cae
typing: fix argument type of encoding.localstr()
It takes both utf-8 and local strings in bytes type.
diff --git a/mercurial/encoding.py b/mercurial/encoding.py
--- a/mercurial/encoding.py
+++ b/mercurial/encoding.py
@@ -117,7 +117,7 @@ class localstr(bytes):
round-tripped to the local encoding and back'''
def __new__(cls, u, l):
- # type: (Type[_Tlocalstr], Text, bytes) -> _Tlocalstr
+ # type: (Type[_Tlocalstr], bytes, bytes) -> _Tlocalstr
s = bytes.__new__(cls, l)
s._utf8 = u
return s
More information about the Mercurial-devel
mailing list