mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 14:04:26 +08:00
Better debugging
This commit is contained in:
@@ -282,6 +282,7 @@ class BaseDefinition(object):
|
|||||||
return all(c.is_stub() for c in self._name.infer())
|
return all(c.is_stub() for c in self._name.infer())
|
||||||
|
|
||||||
def goto_assignments(self, **kwargs): # Python 2...
|
def goto_assignments(self, **kwargs): # Python 2...
|
||||||
|
with debug.increase_indent_cm('goto for %s' % self._name):
|
||||||
return self._goto_assignments(**kwargs)
|
return self._goto_assignments(**kwargs)
|
||||||
|
|
||||||
def _goto_assignments(self, only_stubs=False, prefer_stubs=False):
|
def _goto_assignments(self, only_stubs=False, prefer_stubs=False):
|
||||||
@@ -300,6 +301,7 @@ class BaseDefinition(object):
|
|||||||
for n in names]
|
for n in names]
|
||||||
|
|
||||||
def infer(self, **kwargs): # Python 2...
|
def infer(self, **kwargs): # Python 2...
|
||||||
|
with debug.increase_indent_cm('infer for %s' % self._name):
|
||||||
return self._infer(**kwargs)
|
return self._infer(**kwargs)
|
||||||
|
|
||||||
def _infer(self, only_stubs=False, prefer_stubs=False):
|
def _infer(self, only_stubs=False, prefer_stubs=False):
|
||||||
|
|||||||
@@ -381,10 +381,7 @@ class Evaluator(object):
|
|||||||
|
|
||||||
if node_type == 'trailer' and par.children[0] == '.':
|
if node_type == 'trailer' and par.children[0] == '.':
|
||||||
values = helpers.evaluate_call_of_leaf(context, name, cut_own_trailer=True)
|
values = helpers.evaluate_call_of_leaf(context, name, cut_own_trailer=True)
|
||||||
return unite(
|
return values.py__getattribute__(name, name_context=context, is_goto=True)
|
||||||
value.py__getattribute__(name, name_context=context, is_goto=True)
|
|
||||||
for value in values
|
|
||||||
)
|
|
||||||
else:
|
else:
|
||||||
stmt = tree.search_ancestor(
|
stmt = tree.search_ancestor(
|
||||||
name, 'expr_stmt', 'lambdef'
|
name, 'expr_stmt', 'lambdef'
|
||||||
|
|||||||
Reference in New Issue
Block a user