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

Class OrPattern

mypy/patterns.py:45–55  ·  view source on GitHub ↗

The pattern | | ...

Source from the content-addressed store, hash-verified

43
44
45class OrPattern(Pattern):
46 """The pattern <pattern> | <pattern> | ..."""
47
48 patterns: list[Pattern]
49
50 def __init__(self, patterns: list[Pattern]) -> None:
51 super().__init__()
52 self.patterns = patterns
53
54 def accept(self, visitor: PatternVisitor[T]) -> T:
55 return visitor.visit_or_pattern(self)
56
57
58class ValuePattern(Pattern):

Callers 3

visit_MatchOrMethod · 0.90
visit_or_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…