diff --git a/functions.py b/functions.py index c68ec1d9..34e7ee95 100644 --- a/functions.py +++ b/functions.py @@ -263,9 +263,8 @@ def goto(source, line, column, source_path): definitions = [] for s in scopes: if isinstance(s, imports.ImportPath): - definitions += s.follow() - else: - definitions.append(s) + s = s.follow()[0] + definitions.append(s) else: names = [] #print 's', scopes diff --git a/test/completion/thirdparty/pylab.py b/test/completion/thirdparty/pylab.py index 17e58be9..83d22a40 100644 --- a/test/completion/thirdparty/pylab.py +++ b/test/completion/thirdparty/pylab.py @@ -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']