MCPcopy Create free account
hub / github.com/HelenOS/helenos / evaluate

Method evaluate

tools/config.py:63–81  ·  view source on GitHub ↗
(self, config)

Source from the content-addressed store, hash-verified

61 self._right = right
62
63 def evaluate(self, config):
64 if self._operator == '&':
65 return self._left.evaluate(config) and \
66 self._right.evaluate(config)
67 if self._operator == '|':
68 return self._left.evaluate(config) or \
69 self._right.evaluate(config)
70
71 # '=' or '!='
72 if not self._left in config:
73 config_val = ''
74 else:
75 config_val = config[self._left]
76 if config_val == '*':
77 config_val = 'y'
78
79 if self._operator == '=':
80 return self._right == config_val
81 return self._right != config_val
82
83# Expression parser
84class CondParser:

Callers 5

infer_verify_choicesFunction · 0.80
random_choicesFunction · 0.80
create_outputFunction · 0.80
mainFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected