mirror of
https://github.com/johndoe6345789/AutoMetabuilder.git
synced 2026-04-24 13:54:59 +00:00
13 lines
269 B
Python
13 lines
269 B
Python
"""Workflow plugin: modulo operation."""
|
|
|
|
|
|
def run(_runtime, inputs):
|
|
"""Calculate a modulo b."""
|
|
a = inputs.get("a", 0)
|
|
b = inputs.get("b", 1)
|
|
|
|
if b == 0:
|
|
return {"result": None, "error": "Modulo by zero"}
|
|
|
|
return {"result": a % b}
|