Skip to content

Commit

Permalink
Merge pull request #348 from omit66/bugfix-touch_import_top
Browse files Browse the repository at this point in the history
fixed undefined variable children_hooks + imports cleanup
  • Loading branch information
edschofield committed Feb 21, 2024
2 parents 6babd20 + ab03dfc commit 515f611
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/libfuturize/fixer_util.py
Expand Up @@ -9,11 +9,11 @@
"""

from lib2to3.fixer_util import (FromImport, Newline, is_import,
find_root, does_tree_import, Comma)
find_root, does_tree_import,
Call, Name, Comma)
from lib2to3.pytree import Leaf, Node
from lib2to3.pygram import python_symbols as syms, python_grammar
from lib2to3.pygram import python_symbols as syms
from lib2to3.pygram import token
from lib2to3.fixer_util import (Node, Call, Name, syms, Comma, Number)
import re


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

0 comments on commit 515f611

Please sign in to comment.