1
0
forked from VimPlug/jedi

use expression_list instead of commands or call_list

This commit is contained in:
Dave Halter
2013-12-27 14:24:14 +01:00
parent 76eec7bfc5
commit 4af92b166a
11 changed files with 51 additions and 50 deletions

View File

@@ -441,7 +441,7 @@ class Script(object):
defs, search_name = self._evaluator.goto(stmt)
definitions = follow_inexistent_imports(defs)
if isinstance(user_stmt, pr.Statement):
c = user_stmt.get_commands()
c = user_stmt.expression_list()
if c and not isinstance(c[0], (str, unicode)) \
and c[0].start_pos > self._pos \
and not re.search(r'\.\w+$', goto_path):
@@ -466,7 +466,7 @@ class Script(object):
user_stmt = self._user_stmt()
definitions, search_name = self._goto(add_import_name=True)
if isinstance(user_stmt, pr.Statement):
c = user_stmt.get_commands()[0]
c = user_stmt.expression_list()[0]
if not isinstance(c, unicode) and self._pos < c.start_pos:
# the search_name might be before `=`
definitions = [v for v in user_stmt.get_set_vars()