MCPcopy Create free account
hub / github.com/microsoft/debugpy / InRange

Class InRange

tests/patterns/_impl.py:289–304  ·  view source on GitHub ↗

Matches only if the value is within the specified range.

Source from the content-addressed store, hash-verified

287
288
289class InRange(Also):
290 """Matches only if the value is within the specified range."""
291
292 def __init__(self, pattern, start, stop):
293 super().__init__(pattern)
294 self.start = start
295 self.stop = stop
296
297 def __repr__(self):
298 try:
299 return self.name
300 except AttributeError:
301 return f"({self.start!r} <= {self.pattern!r} < {self.stop!r})"
302
303 def _also(self, value):
304 return self.start <= value < self.stop
305
306
307class EqualTo(Also):

Callers 1

in_rangeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…