Patchwork [1,of,8] import-checker: use absolute_import

login
register
mail settings
Submitter timeless@mozdev.org
Date March 30, 2016, 9:24 a.m.
Message ID <5c2c41affe213e7b8ad2.1459329841@waste.org>
Download mbox | patch
Permalink /patch/14178/
State Accepted
Delegated to: Yuya Nishihara
Headers show

Comments

timeless@mozdev.org - March 30, 2016, 9:24 a.m.
# HG changeset patch
# User timeless <timeless@mozdev.org>
# Date 1459313419 0
#      Wed Mar 30 04:50:19 2016 +0000
# Node ID 5c2c41affe213e7b8ad26759fd6ce5498f9d4b4c
# Parent  ff0d3b6b287f89594bd8d0308fe2810d2a18ea01
import-checker: use absolute_import

Patch

diff --git a/contrib/import-checker.py b/contrib/import-checker.py
--- a/contrib/import-checker.py
+++ b/contrib/import-checker.py
@@ -1,5 +1,7 @@ 
 #!/usr/bin/env python
 
+from __future__ import absolute_import
+
 import ast
 import collections
 import os
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
@@ -3,7 +3,6 @@ 
   $ cd "$TESTDIR"/..
 
   $ hg files 'set:(**.py)' | sed 's|\\|/|g' | xargs python contrib/check-py3-compat.py
-  contrib/import-checker.py not using absolute_import
   contrib/import-checker.py requires print_function
   doc/check-seclevel.py not using absolute_import
   doc/gendoc.py not using absolute_import