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

Method visit_If

mypy/fastparse.py:1332–1336  ·  view source on GitHub ↗
(self, n: ast3.If)

Source from the content-addressed store, hash-verified

1330
1331 # If(expr test, stmt* body, stmt* orelse)
1332 def visit_If(self, n: ast3.If) -> IfStmt:
1333 node = IfStmt(
1334 [self.visit(n.test)], [self.as_required_block(n.body)], self.as_block(n.orelse)
1335 )
1336 return self.set_line(node, n)
1337
1338 # With(withitem* items, stmt* body, string? type_comment)
1339 def visit_With(self, n: ast3.With) -> WithStmt:

Callers

nothing calls this directly

Calls 5

visitMethod · 0.95
as_required_blockMethod · 0.95
as_blockMethod · 0.95
set_lineMethod · 0.95
IfStmtClass · 0.90

Tested by

no test coverage detected