diff --git a/hgext/color.py b/hgext/color.py --- a/hgext/color.py +++ b/hgext/color.py @@ -153,10 +153,18 @@ the pager is active:: 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 @@ def debugcolor(ui, repo, **opts): if os.name != 'nt': w32effects = None else: - import re, ctypes + import ctypes + import re _kernel32 = ctypes.windll.kernel32 diff --git a/tests/test-check-py3-compat.t b/tests/test-check-py3-compat.t --- a/tests/test-check-py3-compat.t +++ b/tests/test-check-py3-compat.t @@ -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