1
0
forked from VimPlug/jedi

First implementation of doing precise if statement filtering.

This commit is contained in:
Dave Halter
2015-06-22 22:16:38 +02:00
parent 6da4f1fffb
commit 64fcbbba79
5 changed files with 114 additions and 3 deletions

View File

@@ -2,6 +2,7 @@ import copy
from itertools import chain
from jedi.parser import tree
from jedi import common
def deep_ast_copy(obj, parent=None, new_elements=None):
@@ -105,6 +106,18 @@ def call_of_name(name, cut_own_trailer=False):
return par
def get_names_of_node(node):
try:
children = node.children
except AttributeError:
if node.type == 'name':
return [node]
else:
return []
else:
return common.unite(get_names_of_node(c) for c in children)
def get_module_names(module, all_scopes):
"""
Returns a dictionary with name parts as keys and their call paths as