# HG changeset patch # User Yuya Nishihara # Date 2019-11-16 06:24:49 # Node ID 009c115eba95b4cff1d998007991045afb771e2a # Parent 7f51bc36194dad67d3197682746092d34cc65690 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