Files
Meisoftcoltd-comfyui-sequen…/test_loop_syntax.py
T
Meisoftcoltd 4e49b99e2d fix: return primitives instead of single-item lists in AutoLoopCalculatorTTSBatch
The AutoLoopCalculatorTTSBatch node was returning its output variables
wrapped in single-item lists (e.g., `[current_chunk_text]`) instead of as
raw primitive values. This caused downstream nodes expecting raw types
(like standard string replacement or string concatenation nodes) to crash,
since Python lists do not have `.replace()` or `.join()` methods.

The brackets were removed from the `return` statement so the node now properly
outputs the exact primitive values.
2026-05-23 13:45:37 +00:00

25 lines
769 B
Python

import sys
import unittest.mock
# Mocking missing dependencies for syntax check
sys.modules['torch'] = unittest.mock.MagicMock()
sys.modules['comfy'] = unittest.mock.MagicMock()
sys.modules['comfy.model_management'] = unittest.mock.MagicMock()
sys.modules['folder_paths'] = unittest.mock.MagicMock()
# Mock internal import to prevent syntax error on register_node
import types
dummy_module = types.ModuleType("dummy")
dummy_module.register_node = lambda c: c
sys.modules[__package__ or '.'] = dummy_module
try:
with open('loop.py') as f:
code = f.read()
code = code.replace('from . import register_node', 'def register_node(c): return c')
exec(code)
print("Syntax is OK")
except Exception as e:
import traceback
traceback.print_exc()