INNER CODE UNIT · Python
bindings
WMAL/kodachios · Kodachi-OS-10-stable/open/dock/lib/kodachi_direct.py:526
def bindings(self, key):
return self.operation(key)["directBindings"]
def launch_allows_handoff(self, key):
policy = self.operation(key)["executionPolicy"]["launchHandoffPolicy"]
if not policy["launch"]:
raise DirectContractError(
"the generated operation is not declared as a launcher")
return policy["handoff"]
def preview(self, key, parameters=None):
bindings = self.bindings(key)
values = dict(parameters or {})
allowed = {item["name"] for binding in bindings
for item in binding["parameters"]}
unexpected = sorted(set(values) - allowed)
if unexpected:
raise DirectContractError(