From ffa736264ef4ef0e1f773a93d27d7b60c46e043a Mon Sep 17 00:00:00 2001 From: David Halter Date: Wed, 1 Aug 2012 14:08:42 +0200 Subject: [PATCH] goto: module lookup now don't includes star imports --- functions.py | 5 ++--- test/completion/thirdparty/pylab.py | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) 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']