star imports and usages

This commit is contained in:
David Halter
2013-07-23 17:21:12 +02:00
parent dbd04da26c
commit 991b138ff3
2 changed files with 5 additions and 1 deletions

View File

@@ -382,7 +382,8 @@ class Script(object):
if add_import_name:
import_name = user_stmt.get_defined_names()
# imports have only one name
if name_part == import_name[0].names[-1]:
if not user_stmt.star \
and name_part == import_name[0].names[-1]:
definitions.append(import_name[0])
else:
stmt = self._get_under_cursor_stmt(goto_path)

View File

@@ -89,6 +89,9 @@ from import_tree.rename1 import abc
#< (0, 32),
from import_tree.rename1 import not_existing
# shouldn't work
#<
from not_existing import *
# -----------------
# classes