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

Method accept

mypy/checkpattern.py:130–135  ·  view source on GitHub ↗
(self, o: Pattern, type_context: Type)

Source from the content-addressed store, hash-verified

128 self.options = options
129
130 def accept(self, o: Pattern, type_context: Type) -> PatternType:
131 self.type_context.append(type_context)
132 result = o.accept(self)
133 self.type_context.pop()
134
135 return result
136
137 def visit_as_pattern(self, o: AsPattern) -> PatternType:
138 current_type = self.type_context[-1]

Callers 6

visit_as_patternMethod · 0.95
visit_or_patternMethod · 0.95
visit_mapping_patternMethod · 0.95
visit_class_patternMethod · 0.95
visit_value_patternMethod · 0.45

Calls 2

appendMethod · 0.80
popMethod · 0.45

Tested by

no test coverage detected