Merge "python3: Fix unicode and gettext"
This commit is contained in:
commit
cd6d69eae7
@ -40,7 +40,13 @@ from hacking import config
|
||||
logging.disable('LOG')
|
||||
|
||||
# Import tests need to inject _ properly into the builtins
|
||||
gettext.install('hacking', unicode=1)
|
||||
kwargs = {}
|
||||
if sys.version_info[0] < 3:
|
||||
# In Python2, eusnure that the _() that gets installed into built-ins
|
||||
# always returns unicodes. This matches the default behavior under Python
|
||||
# 3, although the keyword arguement is not present in the Python 3 API.
|
||||
kwargs['unicode'] = True
|
||||
gettext.install('hacking', **kwargs)
|
||||
|
||||
|
||||
def flake8ext(f):
|
||||
|
Loading…
Reference in New Issue
Block a user