Skip to content

Commit 515f611

Browse files
authored
Merge pull request #348 from omit66/bugfix-touch_import_top
fixed undefined variable children_hooks + imports cleanup
2 parents 6babd20 + ab03dfc commit 515f611

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/libfuturize/fixer_util.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
"""
1010

1111
from lib2to3.fixer_util import (FromImport, Newline, is_import,
12-
find_root, does_tree_import, Comma)
12+
find_root, does_tree_import,
13+
Call, Name, Comma)
1314
from lib2to3.pytree import Leaf, Node
14-
from lib2to3.pygram import python_symbols as syms, python_grammar
15+
from lib2to3.pygram import python_symbols as syms
1516
from lib2to3.pygram import token
16-
from lib2to3.fixer_util import (Node, Call, Name, syms, Comma, Number)
1717
import re
1818

1919

@@ -447,7 +447,6 @@ def check_future_import(node):
447447
else:
448448
node = node.children[3]
449449
# now node is the import_as_name[s]
450-
# print(python_grammar.number2symbol[node.type]) # breaks sometimes
451450
if node.type == syms.import_as_names:
452451
result = set()
453452
for n in node.children:

0 commit comments

Comments
 (0)