Patchwork keyword: use absolute_import

login
register
mail settings
Submitter Christian Ebert
Date March 1, 2016, 5:09 p.m.
Message ID <1874710ab17f12edc7be.1456852149@1.0.0.127.in-addr.arpa>
Download mbox | patch
Permalink /patch/13507/
State Accepted
Delegated to: Yuya Nishihara
Headers show

Comments

Christian Ebert - March 1, 2016, 5:09 p.m.
# HG changeset patch
# User Christian Ebert <blacktrash@gmx.net>
# Date 1456828386 0
#      Tue Mar 01 10:33:06 2016 +0000
# Node ID 1874710ab17f12edc7be463f992e8d7ea0b72157
# Parent  c7f89ad87baef87f00c507545dfd4cc824bc3131
keyword: use absolute_import
Yuya Nishihara - March 2, 2016, 1:47 p.m.
On Tue, 01 Mar 2016 17:09:09 +0000, Christian Ebert wrote:
> # HG changeset patch
> # User Christian Ebert <blacktrash@gmx.net>
> # Date 1456828386 0
> #      Tue Mar 01 10:33:06 2016 +0000
> # Node ID 1874710ab17f12edc7be463f992e8d7ea0b72157
> # Parent  c7f89ad87baef87f00c507545dfd4cc824bc3131
> keyword: use absolute_import
> 
> diff --git a/hgext/keyword.py b/hgext/keyword.py
> --- a/hgext/keyword.py
> +++ b/hgext/keyword.py
> @@ -82,12 +82,32 @@ like CVS' $Log$, are not supported. A ke
>  {desc}" expands to the first line of the changeset description.
>  '''
>  
> -from mercurial import commands, context, cmdutil, dispatch, filelog, extensions
> -from mercurial import localrepo, match, patch, templatefilters, util, error
> -from mercurial import scmutil, pathutil
> +
> +from __future__ import absolute_import
> +
> +import os
> +import re
> +import tempfile
> +
>  from mercurial.hgweb import webcommands
>  from mercurial.i18n import _
> -import os, re, tempfile
> +
> +from mercurial import (
> +    commands,
> +    context,
> +    cmdutil,
> +    dispatch,
> +    filelog,
> +    extensions,
> +    localrepo,
> +    match,
> +    patch,
> +    templatefilters,
> +    util,
> +    error,
> +    scmutil,
> +    pathutil,

Fixed the module order and pushed to the clowncopter, thanks.
Christian Ebert - March 5, 2016, 6:49 p.m.
* Yuya Nishihara on Wednesday, March 02, 2016 at 22:47:36 +0900
> Fixed the module order and pushed to the clowncopter, thanks.

Sorry the oversight re: alphabetical order. Thanks.

Patch

diff --git a/hgext/keyword.py b/hgext/keyword.py
--- a/hgext/keyword.py
+++ b/hgext/keyword.py
@@ -82,12 +82,32 @@  like CVS' $Log$, are not supported. A ke
 {desc}" expands to the first line of the changeset description.
 '''
 
-from mercurial import commands, context, cmdutil, dispatch, filelog, extensions
-from mercurial import localrepo, match, patch, templatefilters, util, error
-from mercurial import scmutil, pathutil
+
+from __future__ import absolute_import
+
+import os
+import re
+import tempfile
+
 from mercurial.hgweb import webcommands
 from mercurial.i18n import _
-import os, re, tempfile
+
+from mercurial import (
+    commands,
+    context,
+    cmdutil,
+    dispatch,
+    filelog,
+    extensions,
+    localrepo,
+    match,
+    patch,
+    templatefilters,
+    util,
+    error,
+    scmutil,
+    pathutil,
+)
 
 cmdtable = {}
 command = cmdutil.command(cmdtable)
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
@@ -59,7 +59,6 @@ 
   hgext/highlight/__init__.py not using absolute_import
   hgext/highlight/highlight.py not using absolute_import
   hgext/histedit.py not using absolute_import
-  hgext/keyword.py not using absolute_import
   hgext/largefiles/__init__.py not using absolute_import
   hgext/largefiles/basestore.py not using absolute_import
   hgext/largefiles/lfcommands.py not using absolute_import