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

Method visit_match_stmt

mypy/semanal.py:5659–5668  ·  view source on GitHub ↗
(self, s: MatchStmt)

Source from the content-addressed store, hash-verified

5657 self.nonlocal_decls[-1].add(name)
5658
5659 def visit_match_stmt(self, s: MatchStmt) -> None:
5660 self.statement = s
5661 infer_reachability_of_match_statement(s, self.options)
5662 s.subject.accept(self)
5663 for i in range(len(s.patterns)):
5664 s.patterns[i].accept(self)
5665 guard = s.guards[i]
5666 if guard is not None:
5667 guard.accept(self)
5668 self.visit_block(s.bodies[i])
5669
5670 def visit_type_alias_stmt(self, s: TypeAliasStmt) -> None:
5671 if s.invalid_recursive_alias:

Callers

nothing calls this directly

Calls 5

visit_blockMethod · 0.95
rangeClass · 0.85
lenFunction · 0.85
acceptMethod · 0.45

Tested by

no test coverage detected