Mercurial > hg-stable
changeset 25985:7eb357b5f774
templater: use absolute_import
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sat, 08 Aug 2015 18:23:53 -0700 |
parents | c57509e88922 |
children | 89049011f304 |
files | mercurial/templater.py tests/test-module-imports.t |
diffstat | 2 files changed, 16 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/templater.py Sat Aug 08 20:09:43 2015 -0700 +++ b/mercurial/templater.py Sat Aug 08 18:23:53 2015 -0700 @@ -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
--- a/tests/test-module-imports.t Sat Aug 08 20:09:43 2015 -0700 +++ b/tests/test-module-imports.t Sat Aug 08 18:23:53 2015 -0700 @@ -112,9 +112,6 @@ 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