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

Class StarredPattern

mypy/patterns.py:96–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94
95
96class StarredPattern(Pattern):
97 # None corresponds to *_ in a list pattern. It will match multiple items but won't bind them to
98 # a name.
99 capture: NameExpr | None
100
101 def __init__(self, capture: NameExpr | None) -> None:
102 super().__init__()
103 self.capture = capture
104
105 def accept(self, visitor: PatternVisitor[T]) -> T:
106 return visitor.visit_starred_pattern(self)
107
108
109class MappingPattern(Pattern):

Callers 3

visit_MatchStarMethod · 0.90
visit_starred_patternMethod · 0.90
read_patternFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…