mirror of
https://github.com/johndoe6345789/AutoMetabuilder.git
synced 2026-05-02 17:55:13 +00:00
4776082c34
Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
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}
|