Files
AutoMetabuilder/backend/autometabuilder/workflow/plugins/math/math_divide.py
2026-01-10 13:36:29 +00:00

13 lines
262 B
Python

"""Workflow plugin: divide numbers."""
def run(_runtime, inputs):
"""Divide a by b."""
a = inputs.get("a", 0)
b = inputs.get("b", 1)
if b == 0:
return {"result": None, "error": "Division by zero"}
return {"result": a / b}