Patchwork [4,of,7] censor: use absolute_import

login
register
mail settings
Submitter Gregory Szorc
Date Feb. 10, 2016, 1:52 a.m.
Message ID <3f54d7079a3f6704c103.1455069159@7.1.168.192.in-addr.arpa>
Download mbox | patch
Permalink /patch/13083/
State Accepted
Delegated to: Martin von Zweigbergk
Headers show

Comments

Gregory Szorc - Feb. 10, 2016, 1:52 a.m.
# HG changeset patch
# User Gregory Szorc <gregory.szorc@gmail.com>
# Date 1455067990 28800
#      Tue Feb 09 17:33:10 2016 -0800
# Node ID 3f54d7079a3f6704c103633290aaca137411f4a2
# Parent  491fdae974fddf7b1d92980ecdc9565de73de2d7
censor: use absolute_import

Patch

diff --git a/hgext/censor.py b/hgext/censor.py
--- a/hgext/censor.py
+++ b/hgext/censor.py
@@ -24,12 +24,22 @@  simply fail when asked to produce censor
 function in a meaningful way. Such commands only tolerate censored file
 revisions if they are allowed by the "censor.policy=ignore" config option.
 """
 
+from __future__ import absolute_import
+
+from mercurial.i18n import _
 from mercurial.node import short
-from mercurial import cmdutil, error, filelog, revlog, scmutil, util
-from mercurial.i18n import _
-from mercurial import lock as lockmod
+
+from mercurial import (
+    cmdutil,
+    error,
+    filelog,
+    lock as lockmod,
+    revlog,
+    scmutil,
+    util,
+)
 
 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
@@ -31,9 +31,8 @@ 
   doc/check-seclevel.py not using absolute_import
   doc/gendoc.py not using absolute_import
   doc/hgmanpage.py not using absolute_import
   hgext/__init__.py not using absolute_import
-  hgext/censor.py not using absolute_import
   hgext/children.py not using absolute_import
   hgext/churn.py not using absolute_import
   hgext/clonebundles.py not using absolute_import
   hgext/color.py not using absolute_import