MCPcopy
hub / github.com/apache/caldera / match

Method match

app/utility/base_object.py:14–27  ·  view source on GitHub ↗
(self, criteria)

Source from the content-addressed store, hash-verified

12 self._created = self.get_current_timestamp()
13
14 def match(self, criteria):
15 if not criteria:
16 return self
17 criteria_matches = []
18 for k, v in criteria.items():
19 if type(v) is tuple:
20 for val in v:
21 if getattr(self, k) == val:
22 criteria_matches.append(True)
23 else:
24 if getattr(self, k) == v:
25 criteria_matches.append(True)
26 if len(criteria_matches) >= len(criteria) and all(criteria_matches):
27 return self
28
29 def update(self, field, value):
30 """

Callers 15

zrFunction · 0.80
seFunction · 0.80
alpine.min.jsFile · 0.80
YnFunction · 0.80
createOptionsFunction · 0.80
jquery.jsFile · 0.80
RFunction · 0.80
jquery.min.jsFile · 0.80
vtFunction · 0.80
xtFunction · 0.80
FtFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected