forked from VimPlug/jedi
First implementation of doing precise if statement filtering.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user