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

Class MappingPattern

mypy/patterns.py:109–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107
108
109class MappingPattern(Pattern):
110 keys: list[Expression]
111 values: list[Pattern]
112 rest: NameExpr | None
113
114 def __init__(
115 self, keys: list[Expression], values: list[Pattern], rest: NameExpr | None
116 ) -> None:
117 super().__init__()
118 assert len(keys) == len(values)
119 self.keys = keys
120 self.values = values
121 self.rest = rest
122
123 def accept(self, visitor: PatternVisitor[T]) -> T:
124 return visitor.visit_mapping_pattern(self)
125
126
127class ClassPattern(Pattern):

Callers 3

visit_MatchMappingMethod · 0.90
visit_mapping_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…