Spaces:
Running
on
Zero
Running
on
Zero
File size: 1,022 Bytes
3d5837a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# Hack: string type that is always equal in not equal comparisons
class AnyType(str):
def __ne__(self, __value: object) -> bool:
return False
# Our any instance wants to be a wildcard string
any = AnyType("*")
class SystemNotification:
@classmethod
def INPUT_TYPES(s):
return {"required": {
"message": ("STRING", {"default": "Your notification has triggered."}),
"any": (any, {}),
"mode": (["always", "on empty queue"], {}),
}}
FUNCTION = "nop"
INPUT_IS_LIST = True
OUTPUT_IS_LIST = (True,)
OUTPUT_NODE = True
RETURN_TYPES = (any,)
CATEGORY = "utils"
def IS_CHANGED(self, **kwargs):
return float("NaN")
def nop(self, any, **kwargs):
return {"ui": {"a": []}, "result": (any,)}
NODE_CLASS_MAPPINGS = {
"SystemNotification|pysssss": SystemNotification,
}
NODE_DISPLAY_NAME_MAPPINGS = {
"SystemNotification|pysssss": "SystemNotification 🐍",
}
|