forked from VimPlug/jedi
FunctionExecution improvement.
This commit is contained in:
@@ -58,13 +58,10 @@ def search_ancestor(node, node_type_or_types):
|
||||
if not isinstance(node_type_or_types, (list, tuple)):
|
||||
node_type_or_types = (node_type_or_types,)
|
||||
|
||||
node = node.parent
|
||||
while node.type not in node_type_or_types:
|
||||
try:
|
||||
node = node.parent
|
||||
except AttributeError:
|
||||
return None
|
||||
return node
|
||||
while True:
|
||||
node = node.parent
|
||||
if node is None or node.type in node_type_or_types:
|
||||
return node
|
||||
|
||||
|
||||
class PositionModifier(object):
|
||||
|
||||
Reference in New Issue
Block a user