Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/encoding.py @ 43681:7edc07fb890c
encoding: fix bad type annotation
This function returns utf-8 in a bytes, not a unicode.
Differential Revision: https://phab.mercurial-scm.org/D7379
author | Augie Fackler <augie@google.com> |
---|---|
date | Wed, 13 Nov 2019 20:32:24 -0500 |
parents | 9f70512ae2cf |
children | 7cf332318f62 |
comparison
equal
deleted
inserted
replaced
43680:9c1eccdd7ed8 | 43681:7edc07fb890c |
---|---|
203 except LookupError as k: | 203 except LookupError as k: |
204 raise error.Abort(k, hint=b"please check your locale settings") | 204 raise error.Abort(k, hint=b"please check your locale settings") |
205 | 205 |
206 | 206 |
207 def fromlocal(s): | 207 def fromlocal(s): |
208 # type: (bytes) -> Text | 208 # type: (bytes) -> bytes |
209 """ | 209 """ |
210 Convert a string from the local character encoding to UTF-8 | 210 Convert a string from the local character encoding to UTF-8 |
211 | 211 |
212 We attempt to decode strings using the encoding mode set by | 212 We attempt to decode strings using the encoding mode set by |
213 HGENCODINGMODE, which defaults to 'strict'. In this mode, unknown | 213 HGENCODINGMODE, which defaults to 'strict'. In this mode, unknown |