MCPcopy Index your code
hub / github.com/python/mypy / visit_List

Method visit_List

mypy/fastparse.py:1741–1748  ·  view source on GitHub ↗
(self, n: ast3.List)

Source from the content-addressed store, hash-verified

1739
1740 # List(expr* elts, expr_context ctx)
1741 def visit_List(self, n: ast3.List) -> ListExpr | TupleExpr:
1742 expr_list: list[Expression] = [self.visit(e) for e in n.elts]
1743 if isinstance(n.ctx, ast3.Store):
1744 # [x, y] = z and (x, y) = z means exactly the same thing
1745 e: ListExpr | TupleExpr = TupleExpr(expr_list)
1746 else:
1747 e = ListExpr(expr_list)
1748 return self.set_line(e, n)
1749
1750 # Tuple(expr* elts, expr_context ctx)
1751 def visit_Tuple(self, n: ast3.Tuple) -> TupleExpr:

Callers

nothing calls this directly

Calls 5

visitMethod · 0.95
set_lineMethod · 0.95
TupleExprClass · 0.90
ListExprClass · 0.90
isinstanceFunction · 0.85

Tested by

no test coverage detected