Patchwork [7,of,7] convert: __init__ use absolute_import

login
register
mail settings
Submitter timeless@mozdev.org
Date March 9, 2016, 4:25 a.m.
Message ID <e6a26aef26757ed9b9ea.1457497519@waste.org>
Download mbox | patch
Permalink /patch/13711/
State Accepted
Headers show

Comments

timeless@mozdev.org - March 9, 2016, 4:25 a.m.
# HG changeset patch
# User timeless <timeless@mozdev.org>
# Date 1456936483 0
#      Wed Mar 02 16:34:43 2016 +0000
# Node ID e6a26aef26757ed9b9ea7cf408baf5736f3f623b
# Parent  922f364ac290f392b29f20a64de509016a0f440b
convert: __init__ use absolute_import
Pierre-Yves David - March 9, 2016, 6:05 p.m.
On 03/09/2016 04:25 AM, timeless wrote:
> # HG changeset patch
> # User timeless <timeless@mozdev.org>
> # Date 1456936483 0
> #      Wed Mar 02 16:34:43 2016 +0000
> # Node ID e6a26aef26757ed9b9ea7cf408baf5736f3f623b
> # Parent  922f364ac290f392b29f20a64de509016a0f440b
> convert: __init__ use absolute_import

pushed to the clowncopter, thanks.

Patch

diff --git a/hgext/convert/__init__.py b/hgext/convert/__init__.py
--- a/hgext/convert/__init__.py
+++ b/hgext/convert/__init__.py
@@ -7,12 +7,20 @@ 
 
 '''import revisions from foreign VCS repositories into Mercurial'''
 
-import convcmd
-import cvsps
-import subversion
-from mercurial import cmdutil, templatekw
+from __future__ import absolute_import
+
+from mercurial import (
+    cmdutil,
+    templatekw,
+)
 from mercurial.i18n import _
 
+from . import (
+    convcmd,
+    cvsps,
+    subversion,
+)
+
 cmdtable = {}
 command = cmdutil.command(cmdtable)
 # Note for extension authors: ONLY specify testedwith = 'internal' for
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
@@ -24,7 +24,6 @@ 
   doc/hgmanpage.py not using absolute_import
   hgext/__init__.py not using absolute_import
   hgext/color.py not using absolute_import
-  hgext/convert/__init__.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