Patchwork D7379: encoding: fix bad type annotation

login
register
mail settings
Submitter phabricator
Date Nov. 14, 2019, 3:51 a.m.
Message ID <differential-rev-PHID-DREV-gkd5eiootiihqpldltnm-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/43171/
State Superseded
Headers show

Comments

phabricator - Nov. 14, 2019, 3:51 a.m.
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  This function returns utf-8 in a bytes, not a unicode.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D7379

AFFECTED FILES
  mercurial/encoding.py

CHANGE DETAILS




To: durin42, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/encoding.py b/mercurial/encoding.py
--- a/mercurial/encoding.py
+++ b/mercurial/encoding.py
@@ -205,7 +205,7 @@ 
 
 
 def fromlocal(s):
-    # type: (bytes) -> Text
+    # type: (bytes) -> bytes
     """
     Convert a string from the local character encoding to UTF-8