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

Method visit_MatchSequence

mypy/fastparse.py:1778–1784  ·  view source on GitHub ↗
(self, n: ast3.MatchSequence)

Source from the content-addressed store, hash-verified

1776 return self.set_line(node, n)
1777
1778 def visit_MatchSequence(self, n: ast3.MatchSequence) -> SequencePattern:
1779 patterns = [self.visit(p) for p in n.patterns]
1780 stars = [p for p in patterns if isinstance(p, StarredPattern)]
1781 assert len(stars) < 2
1782
1783 node = SequencePattern(patterns)
1784 return self.set_line(node, n)
1785
1786 def visit_MatchStar(self, n: ast3.MatchStar) -> StarredPattern:
1787 if n.name is None:

Callers

nothing calls this directly

Calls 5

visitMethod · 0.95
set_lineMethod · 0.95
SequencePatternClass · 0.90
isinstanceFunction · 0.85
lenFunction · 0.85

Tested by

no test coverage detected