Skip to content

Commit d1d5b1f

Browse files
authored
Merge pull request #16 from StableLlama/fix_control_flow
Fix control flow node bugs
2 parents a63d7a0 + 02d9d69 commit d1d5b1f

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "basic_data_handling"
7-
version = "0.4.1"
7+
version = "0.4.2"
88
description = """Basic Python functions for manipulating data that every programmer is used to.
99
Comprehensive node collection for data manipulation in ComfyUI workflows.
1010

src/basic_data_handling/control_flow_nodes.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ def check_lazy_status(self, select: int, **kwargs) -> list[str]:
188188

189189
return needed
190190

191-
def execute(self, selector: int, **kwargs) -> tuple[Any]:
191+
def execute(self, select: int, **kwargs) -> tuple[Any]:
192192
# Build a case array from all case_X inputs
193193
cases = []
194194
for i in range(len(kwargs)):
@@ -199,8 +199,8 @@ def execute(self, selector: int, **kwargs) -> tuple[Any]:
199199
break
200200

201201
# Return the selected case if valid
202-
if 0 <= selector < len(cases) and cases[selector] is not None:
203-
return (cases[selector],)
202+
if 0 <= select < len(cases) and cases[select] is not None:
203+
return (cases[select],)
204204

205205
# If select is out of range or the selected case is None, return default
206206
return (kwargs.get("default"),)
@@ -229,10 +229,6 @@ def INPUT_TYPES(cls):
229229
DESCRIPTION = cleandoc(__doc__ or "")
230230
FUNCTION = "execute"
231231

232-
@classmethod
233-
def IS_CHANGED(s, value: Any):
234-
return float("NaN") # not equal to anything -> trigger recalculation
235-
236232
def execute(self, value: Any, select: bool = True) -> tuple[Any]:
237233
if select:
238234
return (value,)
@@ -296,6 +292,10 @@ def INPUT_TYPES(cls):
296292
DESCRIPTION = cleandoc(__doc__ or "")
297293
FUNCTION = "execute"
298294

295+
@classmethod
296+
def IS_CHANGED(s, value: Any):
297+
return float("NaN") # not equal to anything -> trigger recalculation
298+
299299
def execute(self, value: Any) -> tuple[Any, int]:
300300
return (value,)
301301

0 commit comments

Comments
 (0)