Mercurial > public > mercurial-scm > hg-stable
diff mercurial/encoding.py @ 32231:cf424dae5dc7
check-code: ignore re-exports of os.environ in encoding.py
These are valid uses of os.environ.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Mon, 01 May 2017 17:23:48 +0900 |
parents | 6c0ae9683437 |
children | 1a3a08b5d4d5 |
line wrap: on
line diff
--- a/mercurial/encoding.py Wed Apr 26 21:51:19 2017 +0900 +++ b/mercurial/encoding.py Mon May 01 17:23:48 2017 +0900 @@ -51,14 +51,14 @@ # the process environment _nativeenviron = (not pycompat.ispy3 or os.supports_bytes_environ) if not pycompat.ispy3: - environ = os.environ + environ = os.environ # re-exports elif _nativeenviron: - environ = os.environb + environ = os.environb # re-exports else: # preferred encoding isn't known yet; use utf-8 to avoid unicode error # and recreate it once encoding is settled environ = dict((k.encode(u'utf-8'), v.encode(u'utf-8')) - for k, v in os.environ.items()) + for k, v in os.environ.items()) # re-exports def _getpreferredencoding(): ''' @@ -218,7 +218,7 @@ # now encoding and helper functions are available, recreate the environ # dict to be exported to other modules environ = dict((tolocal(k.encode(u'utf-8')), tolocal(v.encode(u'utf-8'))) - for k, v in os.environ.items()) + for k, v in os.environ.items()) # re-exports # How to treat ambiguous-width characters. Set to 'wide' to treat as wide. wide = (environ.get("HGENCODINGAMBIGUOUS", "narrow") == "wide"