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

Method visit_Match

mypy/fastparse.py:1761–1768  ·  view source on GitHub ↗
(self, n: ast3.Match)

Source from the content-addressed store, hash-verified

1759
1760 # Match(expr subject, match_case* cases) # python 3.10 and later
1761 def visit_Match(self, n: ast3.Match) -> MatchStmt:
1762 node = MatchStmt(
1763 self.visit(n.subject),
1764 [self.visit(c.pattern) for c in n.cases],
1765 [self.visit(c.guard) for c in n.cases],
1766 [self.as_required_block(c.body) for c in n.cases],
1767 )
1768 return self.set_line(node, n)
1769
1770 def visit_MatchValue(self, n: ast3.MatchValue) -> ValuePattern:
1771 node = ValuePattern(self.visit(n.value))

Callers

nothing calls this directly

Calls 4

visitMethod · 0.95
as_required_blockMethod · 0.95
set_lineMethod · 0.95
MatchStmtClass · 0.90

Tested by

no test coverage detected