Patchwork [2,of,7] blackbox: use absolute_import

login
register
mail settings
Submitter Gregory Szorc
Date Feb. 10, 2016, 1:52 a.m.
Message ID <c03355ab7648c3bf09c7.1455069157@7.1.168.192.in-addr.arpa>
Download mbox | patch
Permalink /patch/13081/
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 1455067838 28800
#      Tue Feb 09 17:30:38 2016 -0800
# Node ID c03355ab7648c3bf09c7fab2e74c870bcea35ebc
# Parent  1d08873cd79736b708c7fdd601af5e43ffb1b289
blackbox: use absolute_import

Patch

diff --git a/hgext/blackbox.py b/hgext/blackbox.py
--- a/hgext/blackbox.py
+++ b/hgext/blackbox.py
@@ -28,11 +28,19 @@  Examples::
   maxfiles = 3
 
 """
 
-from mercurial import util, cmdutil
+from __future__ import absolute_import
+
+import errno
+import os
+import re
+
 from mercurial.i18n import _
-import errno, os, re
+from mercurial import (
+    cmdutil,
+    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/blackbox.py not using absolute_import
   hgext/bugzilla.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