From ea4f7053d6aba3be44fe49c6d0367f2ac718165b Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Sun, 7 Dec 2014 14:13:59 +0100 Subject: [PATCH] Fix completion/definition.py tests. --- jedi/api/__init__.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/jedi/api/__init__.py b/jedi/api/__init__.py index 337afc64..86dd3ad3 100644 --- a/jedi/api/__init__.py +++ b/jedi/api/__init__.py @@ -411,7 +411,6 @@ class Script(object): scopes.update(resolve_import_paths(set(s.follow()))) return scopes - user_stmt = self._parser.user_stmt_with_whitespace() goto_path = self._user_context.get_path_under_cursor() context = self._user_context.get_context() definitions = set() @@ -420,9 +419,8 @@ class Script(object): else: # Fetch definition of callee, if there's no path otherwise. if not goto_path: - node, _, _ = search_call_signatures(user_stmt, self._pos) - if node is not None: - definitions = set(self._evaluator.eval_element(node)) + definitions = set(signature._definition + for signature in self.call_signatures()) if not definitions: if goto_path: @@ -577,7 +575,7 @@ class Script(object): if call_txt is None: return [] - print(call_txt, call_index) + #print(call_txt, call_index) stmt = self._get_under_cursor_stmt(call_txt) #user_stmt = self._parser.user_stmt_with_whitespace() #call, trailer, index = search_call_signatures(user_stmt, self._pos)