MCPcopy
hub / github.com/python/mypy / visit_DictComp

Method visit_DictComp

mypy/fastparse.py:1565–1573  ·  view source on GitHub ↗
(self, n: ast3.DictComp)

Source from the content-addressed store, hash-verified

1563
1564 # DictComp(expr key, expr value, comprehension* generators)
1565 def visit_DictComp(self, n: ast3.DictComp) -> DictionaryComprehension:
1566 targets = [self.visit(c.target) for c in n.generators]
1567 iters = [self.visit(c.iter) for c in n.generators]
1568 ifs_list = [self.translate_expr_list(c.ifs) for c in n.generators]
1569 is_async = [bool(c.is_async) for c in n.generators]
1570 e = DictionaryComprehension(
1571 self.visit(n.key), self.visit(n.value), targets, iters, ifs_list, is_async
1572 )
1573 return self.set_line(e, n)
1574
1575 # GeneratorExp(expr elt, comprehension* generators)
1576 def visit_GeneratorExp(self, n: ast3.GeneratorExp) -> GeneratorExpr:

Callers

nothing calls this directly

Calls 5

visitMethod · 0.95
translate_expr_listMethod · 0.95
set_lineMethod · 0.95
boolClass · 0.85

Tested by

no test coverage detected