diff --git a/jedi/api/__init__.py b/jedi/api/__init__.py index 46994bb4..c5359c26 100644 --- a/jedi/api/__init__.py +++ b/jedi/api/__init__.py @@ -404,7 +404,6 @@ class Script(object): user_stmt = self._parser.user_stmt() user_scope = self._parser.user_scope() - # TODO restructure this. stmt is not always needed. stmt = self._get_under_cursor_stmt(goto_path) if stmt is None: return [] @@ -433,19 +432,6 @@ class Script(object): self._user_context, user_stmt) definitions = self._evaluator.goto(name) - """ - try: - definitions = [s.follow(is_goto=True)[0]] - except IndexError: - definitions = [] - - if add_import_name: - import_name = user_stmt.get_defined_names() - # imports have only one name - np = import_name[0] - if not user_stmt.is_star_import() and unicode(name_part) == unicode(np): - definitions.append(np) - """ else: # The Evaluator.goto function checks for definitions, but since we # use a reverse tokenizer, we have new name_part objects, so we