goto: module lookup now don't includes star imports

This commit is contained in:
David Halter
2012-08-01 14:08:42 +02:00
parent 7e4658122a
commit ffa736264e
2 changed files with 4 additions and 5 deletions

View File

@@ -263,8 +263,7 @@ def goto(source, line, column, source_path):
definitions = []
for s in scopes:
if isinstance(s, imports.ImportPath):
definitions += s.follow()
else:
s = s.follow()[0]
definitions.append(s)
else:
names = []

View File

@@ -2,9 +2,9 @@ import pylab
pylab.
# two gotos
#! ['numpy']
#! ['module /usr/lib/python2.7/dist-packages/numpy/__init__.py']
import numpy
#! ['random']
#! ['module random']
import numpy.random
#? ['array2string']