MCPcopy
hub / github.com/ray-project/ray / matches

Method matches

python/ray/_common/test_utils.py:412–426  ·  view source on GitHub ↗
(self, sample: "Sample")

Source from the content-addressed store, hash-verified

410 partial_label_match: Optional[Dict[str, str]] = None
411
412 def matches(self, sample: "Sample"):
413 if self.name is not None:
414 if self.name != sample.name:
415 return False
416
417 if self.value is not None:
418 if self.value != sample.value:
419 return False
420
421 if self.partial_label_match is not None:
422 for label, value in self.partial_label_match.items():
423 if sample.labels.get(label) != value:
424 return False
425
426 return True
427
428
429@dataclass

Callers 1

fFunction · 0.45

Calls 2

getMethod · 0.65
itemsMethod · 0.45

Tested by

no test coverage detected