[PATCH 3 of 5]fix_bytes: use absolute_import

Pulkit Goyal 7895pulkit at gmail.com
Fri Mar 11 09:45:24 EST 2016


# HG changeset patch
# User Pulkit Goyal <7895pulkit at gmail.com>
# Date 1457233344 -19800
#      Sun Mar 06 08:32:24 2016 +0530
# Node ID 373c63b0a98720fa9a05ead8df2f88535033941e
# Parent  f295850eade25c98e2eb12fcbc7886bb628335cb
fix_bytes: use absolute_import

diff -r f295850eade2 -r 373c63b0a987 contrib/hgfixes/fix_bytes.py
--- a/contrib/hgfixes/fix_bytes.py    Sun Mar 06 08:29:48 2016 +0530
+++ b/contrib/hgfixes/fix_bytes.py    Sun Mar 06 08:32:24 2016 +0530
@@ -1,11 +1,20 @@
 """Fixer that changes plain strings to bytes strings."""

+from __future__ import absolute_import
 import re

-from lib2to3 import fixer_base
-from lib2to3.pgen2 import token
-from lib2to3.fixer_util import Name
-from lib2to3.pygram import python_symbols as syms
+from lib2to3 import (
+fixer_base,
+)
+from lib2to3.pgen2 import (
+token,
+)
+from lib2to3.fixer_util import (
+Name,
+)
+from lib2to3.pygram import (
+python_symbols as syms,
+)

 _re = re.compile(r'[rR]?[\'\"]')

diff -r f295850eade2 -r 373c63b0a987 tests/test-check-py3-compat.t
--- a/tests/test-check-py3-compat.t    Sun Mar 06 08:29:48 2016 +0530
+++ b/tests/test-check-py3-compat.t    Sun Mar 06 08:32:24 2016 +0530
@@ -3,7 +3,6 @@
   $ cd "$TESTDIR"/..

   $ hg files 'set:(**.py)' | sed 's|\\|/|g' | xargs python
contrib/check-py3-compat.py
-  contrib/hgfixes/fix_bytes.py not using absolute_import
   contrib/hgfixes/fix_bytesmod.py not using absolute_import
   contrib/hgfixes/fix_leftover_imports.py not using absolute_import
   contrib/import-checker.py not using absolute_import


More information about the Mercurial-devel mailing list