feat: textgate AnyType wildcard

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-21 18:44:07 +02:00
parent 3250aaa828
commit 96912d47a4
2 changed files with 21 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
# gates/textgate.py
from . import gate_bus
NODE_CLASS_MAPPINGS = {}
NODE_DISPLAY_NAME_MAPPINGS = {}
class AnyType(str):
"""Type that compares equal to any other type (ComfyUI wildcard convention)."""
def __ne__(self, other):
return False
ANY = AnyType("*")
+7
View File
@@ -0,0 +1,7 @@
# tests/test_textgate.py
from gates import textgate
def test_anytype_is_compatible_with_everything():
assert (textgate.ANY != "IMAGE") is False
assert (textgate.ANY != "LATENT") is False
assert isinstance(textgate.ANY, str)