1
0
forked from VimPlug/jedi

Move get_node() to tree_node and replace all the custom classdefs/funcdefs.

This commit is contained in:
Dave Halter
2017-01-05 23:43:12 +01:00
parent b44f0aae5d
commit ae8e43d3c7
24 changed files with 90 additions and 99 deletions

View File

@@ -137,7 +137,7 @@ def _search_function_executions(evaluator, module_context, funcdef):
def _get_possible_nodes(module_context, func_string_name):
try:
names = module_context.module_node.used_names[func_string_name]
names = module_context.tree_node.used_names[func_string_name]
except KeyError:
return
@@ -169,7 +169,7 @@ def _check_name_for_execution(evaluator, context, compare_node, name, trailer):
yield execution
for value in evaluator.goto_definitions(context, name):
value_node = value.get_node()
value_node = value.tree_node
if compare_node == value_node:
for func_execution in create_func_excs():
yield func_execution
@@ -182,7 +182,7 @@ def _check_name_for_execution(evaluator, context, compare_node, name, trailer):
if len(params) != 1:
continue
values = params[0].infer()
nodes = [v.get_node() for v in values]
nodes = [v.tree_node for v in values]
if nodes == [compare_node]:
# Found a decorator.
module_context = context.get_root_context()