1
0
forked from VimPlug/jedi

Cleanup the mess of comprehensions at least a bit

This commit is contained in:
Dave Halter
2019-05-31 14:04:37 +02:00
parent 39eefdbc00
commit ed93bbfb68
2 changed files with 46 additions and 48 deletions

View File

@@ -233,8 +233,12 @@ class TreeArguments(AbstractArguments):
named_args.append((c[0].value, LazyTreeContext(self.context, c[2]),))
else: # Generator comprehension.
# Include the brackets with the parent.
comp = iterable.ArgumentGeneratorComprehension(
self._evaluator, self.context, el)
comp = iterable.GeneratorComprehension(
self._evaluator,
defining_context=self.context,
comp_for_node=el.children[1],
entry_node=el.children[0],
)
yield None, LazyKnownContext(comp)
else:
yield None, LazyTreeContext(self.context, el)