MCPcopy Create free account
hub / github.com/BUPT-GAMMA/MASFactory / match

Method match

masfactory/utils/selector.py:62–64  ·  view source on GitHub ↗

Match a runtime instance against this selector.

(self, obj: object)

Source from the content-addressed store, hash-verified

60 self._predicate = predicate
61
62 def match(self, obj: object) -> bool:
63 """Match a runtime instance against this selector."""
64 return self._match_target(SelectionTarget.from_obj(obj))
65
66 def match_declaration(self, *, name: str | None, cls: type | None) -> bool:
67 """Match a (name, type) declaration against this selector.

Callers 15

_validate_nodeFunction · 0.80
_normalize_scopeFunction · 0.80
validate_oneFunction · 0.80
_match_targetMethod · 0.80
hook_registerMethod · 0.80
parse_field_specFunction · 0.80
hook_registerMethod · 0.80
formatMethod · 0.80
get_content_betweenMethod · 0.80
extract_answer_from_textFunction · 0.80
extract_answer_from_textFunction · 0.80
extract_python_codeFunction · 0.80

Calls 2

_match_targetMethod · 0.95
from_objMethod · 0.80

Tested by

no test coverage detected