# HG changeset patch # User Gregory Szorc # Date 2015-08-09 01:23:53 # Node ID 7eb357b5f77473cf3eac32750e0d26e86d0ef191 # Parent c57509e889227d559a3b8957019c110b3ffc5df5 templater: use absolute_import diff --git a/mercurial/templater.py b/mercurial/templater.py --- a/mercurial/templater.py +++ b/mercurial/templater.py @@ -5,12 +5,23 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. -from i18n import _ -import os, re -import util, config, templatefilters, templatekw, parser, error -import revset as revsetmod +from __future__ import absolute_import + +import os +import re import types -import minirst + +from .i18n import _ +from . import ( + config, + error, + minirst, + parser, + revset as revsetmod, + templatefilters, + templatekw, + util, +) # template parsing diff --git a/tests/test-module-imports.t b/tests/test-module-imports.t --- a/tests/test-module-imports.t +++ b/tests/test-module-imports.t @@ -112,9 +112,6 @@ hidden by deduplication algorithm in the these may expose other cycles. $ hg locate 'mercurial/**.py' 'hgext/**.py' | sed 's-\\-/-g' | python "$import_checker" - - mercurial/templater.py mixed imports - stdlib: parser - relative: config, error, templatefilters, templatekw, util mercurial/ui.py mixed imports stdlib: formatter relative: config, error, progress, scmutil, util