summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rwxr-xr-xtools/hacking.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/hacking.py b/tools/hacking.py
index 1c2e11218..4e42d3e89 100755
--- a/tools/hacking.py
+++ b/tools/hacking.py
@@ -105,7 +105,7 @@ def import_normalize(line):
# convert "from x import y" to "import x.y"
# handle "from x import y as z" to "import x.y as z"
split_line = line.split()
- if (line.startswith("from ") and "," not in line and
+ if ("import" in line and line.startswith("from ") and "," not in line and
split_line[2] == "import" and split_line[3] != "*" and
split_line[1] != "__future__" and
(len(split_line) == 4 or