Mercurial > hg-stable
changeset 28968:a5d449a7bc8f
py3: make color use absolute_import
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Sun, 17 Apr 2016 00:53:56 +0530 |
parents | cd5e7195e441 |
children | cca011fd1ea7 |
files | hgext/color.py tests/test-check-py3-compat.t |
diffstat | 2 files changed, 13 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/color.py Sun Apr 17 00:23:05 2016 +0530 +++ b/hgext/color.py Sun Apr 17 00:53:56 2016 +0530 @@ -153,10 +153,18 @@ If ``pagermode`` is not defined, the ``mode`` will be used. ''' -import os +from __future__ import absolute_import -from mercurial import cmdutil, commands, dispatch, extensions, subrepo, util -from mercurial import ui as uimod +import os +from mercurial import ( + cmdutil, + commands, + dispatch, + extensions, + subrepo, + ui as uimod, + util, +) from mercurial.i18n import _ cmdtable = {} @@ -523,7 +531,8 @@ if os.name != 'nt': w32effects = None else: - import re, ctypes + import ctypes + import re _kernel32 = ctypes.windll.kernel32
--- a/tests/test-check-py3-compat.t Sun Apr 17 00:23:05 2016 +0530 +++ b/tests/test-check-py3-compat.t Sun Apr 17 00:53:56 2016 +0530 @@ -3,7 +3,6 @@ $ cd "$TESTDIR"/.. $ hg files 'set:(**.py)' | sed 's|\\|/|g' | xargs python contrib/check-py3-compat.py - hgext/color.py not using absolute_import hgext/eol.py not using absolute_import hgext/extdiff.py not using absolute_import hgext/factotum.py not using absolute_import