From c01ccba7076719566cbb3188bfd4cbb1dabc5b73 Mon Sep 17 00:00:00 2001 From: StableLlama Date: Mon, 14 Jul 2025 19:36:09 +0200 Subject: [PATCH] Fix formula node (catagory as well as make every input optional) --- pyproject.toml | 2 +- src/basic_data_handling/math_formula_node.py | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 1d99235..ee03f5c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "basic_data_handling" -version = "0.4.4" +version = "0.4.5" description = """Basic Python functions for manipulating data that every programmer is used to, lightweight with no additional dependencies. Supported data types: diff --git a/src/basic_data_handling/math_formula_node.py b/src/basic_data_handling/math_formula_node.py index f2149e6..f9d66a1 100644 --- a/src/basic_data_handling/math_formula_node.py +++ b/src/basic_data_handling/math_formula_node.py @@ -43,14 +43,16 @@ class MathFormula(ComfyNodeABC): @classmethod def INPUT_TYPES(cls): return { - "required": ContainsDynamicDict({ - "formula": (IO.STRING, {"default": "-e() ** -2"}), - "a": (IO.NUMBER, {"default": 3.0, "_dynamic": "letter"}), + "required": { + "formula": (IO.STRING, {"default": "-pi() ** 2"}), + }, + "optional": ContainsDynamicDict({ + "a": (IO.NUMBER, {"default": 0.0, "_dynamic": "letter"}), }), } RETURN_TYPES = (IO.FLOAT,) - CATEGORY = "math" + CATEGORY = "Basic/maths" DESCRIPTION = cleandoc(__doc__ or "") FUNCTION = "evaluate"