Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "basic_data_handling"
version = "0.4.1"
version = "0.4.2"
description = """Basic Python functions for manipulating data that every programmer is used to.
Comprehensive node collection for data manipulation in ComfyUI workflows.

Expand Down
14 changes: 7 additions & 7 deletions src/basic_data_handling/control_flow_nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def check_lazy_status(self, select: int, **kwargs) -> list[str]:

return needed

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

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

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

@classmethod
def IS_CHANGED(s, value: Any):
return float("NaN") # not equal to anything -> trigger recalculation

def execute(self, value: Any, select: bool = True) -> tuple[Any]:
if select:
return (value,)
Expand Down Expand Up @@ -296,6 +292,10 @@ def INPUT_TYPES(cls):
DESCRIPTION = cleandoc(__doc__ or "")
FUNCTION = "execute"

@classmethod
def IS_CHANGED(s, value: Any):
return float("NaN") # not equal to anything -> trigger recalculation

def execute(self, value: Any) -> tuple[Any, int]:
return (value,)

Expand Down