diff --git a/gates/textgate.py b/gates/textgate.py new file mode 100644 index 0000000..c65c72a --- /dev/null +++ b/gates/textgate.py @@ -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("*") diff --git a/tests/test_textgate.py b/tests/test_textgate.py new file mode 100644 index 0000000..90553e0 --- /dev/null +++ b/tests/test_textgate.py @@ -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)