forked from VimPlug/jedi
search_ancestor now uses *node_types as a parameter instead of a mix of tuple and simple string like isinstance.
This commit is contained in:
@@ -350,8 +350,8 @@ class FunctionExecutionContext(context.TreeContext):
|
||||
|
||||
@recursion.execution_recursion_decorator(default=iter([]))
|
||||
def get_yield_values(self):
|
||||
for_parents = [(y, tree.search_ancestor(y, ('for_stmt', 'funcdef',
|
||||
'while_stmt', 'if_stmt')))
|
||||
for_parents = [(y, tree.search_ancestor(y, 'for_stmt', 'funcdef',
|
||||
'while_stmt', 'if_stmt'))
|
||||
for y in self.tree_node.iter_yield_exprs()]
|
||||
|
||||
# Calculate if the yields are placed within the same for loop.
|
||||
|
||||
Reference in New Issue
Block a user