diff --git a/jedi/api/classes.py b/jedi/api/classes.py index 9344adc7..af8e01da 100644 --- a/jedi/api/classes.py +++ b/jedi/api/classes.py @@ -282,7 +282,8 @@ class BaseDefinition(object): return all(c.is_stub() for c in self._name.infer()) def goto_assignments(self, **kwargs): # Python 2... - return self._goto_assignments(**kwargs) + with debug.increase_indent_cm('goto for %s' % self._name): + return self._goto_assignments(**kwargs) def _goto_assignments(self, only_stubs=False, prefer_stubs=False): assert not (only_stubs and prefer_stubs) @@ -300,7 +301,8 @@ class BaseDefinition(object): for n in names] def infer(self, **kwargs): # Python 2... - return self._infer(**kwargs) + with debug.increase_indent_cm('infer for %s' % self._name): + return self._infer(**kwargs) def _infer(self, only_stubs=False, prefer_stubs=False): assert not (only_stubs and prefer_stubs) diff --git a/jedi/evaluate/__init__.py b/jedi/evaluate/__init__.py index 9c1b21ed..92908639 100644 --- a/jedi/evaluate/__init__.py +++ b/jedi/evaluate/__init__.py @@ -381,10 +381,7 @@ class Evaluator(object): if node_type == 'trailer' and par.children[0] == '.': values = helpers.evaluate_call_of_leaf(context, name, cut_own_trailer=True) - return unite( - value.py__getattribute__(name, name_context=context, is_goto=True) - for value in values - ) + return values.py__getattribute__(name, name_context=context, is_goto=True) else: stmt = tree.search_ancestor( name, 'expr_stmt', 'lambdef'