changeset 29309:bfc1052570b6

py3: make largefiles/lfutil.py use absolute_import
author liscju <piotr.listkiewicz@gmail.com>
date Tue, 10 May 2016 15:09:22 +0200
parents 8c378a7d2aa6
children f89f83c8393a
files hgext/largefiles/lfutil.py tests/test-check-py3-compat.t
diffstat 2 files changed, 13 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/largefiles/lfutil.py	Sat May 07 15:44:46 2016 +0200
+++ b/hgext/largefiles/lfutil.py	Tue May 10 15:09:22 2016 +0200
@@ -7,15 +7,24 @@
 # GNU General Public License version 2 or any later version.
 
 '''largefiles utility code: must not import other modules in this package.'''
+from __future__ import absolute_import
 
+import copy
 import os
 import platform
 import stat
-import copy
+
+from mercurial.i18n import _
 
-from mercurial import dirstate, httpconnection, match as match_, util, scmutil
-from mercurial.i18n import _
-from mercurial import node, error
+from mercurial import (
+    dirstate,
+    error,
+    httpconnection,
+    match as match_,
+    node,
+    scmutil,
+    util,
+)
 
 shortname = '.hglf'
 shortnameslash = shortname + '/'
--- a/tests/test-check-py3-compat.t	Sat May 07 15:44:46 2016 +0200
+++ b/tests/test-check-py3-compat.t	Tue May 10 15:09:22 2016 +0200
@@ -10,7 +10,6 @@
   hgext/fsmonitor/pywatchman/pybser.py not using absolute_import
   hgext/highlight/__init__.py not using absolute_import
   hgext/highlight/highlight.py not using absolute_import
-  hgext/largefiles/lfutil.py not using absolute_import
   hgext/largefiles/localstore.py not using absolute_import
   hgext/largefiles/overrides.py not using absolute_import
   hgext/largefiles/proto.py not using absolute_import