Files
ComfyUI_frontend/tools/devtools/nodes/errors.py
bymyself 939d1a0e44 Merge branch 'main' into bl-selective-snapshot-update
Resolved conflicts in update-playwright-expectations.yaml by:
- Keeping main's improvements: concurrency control, comment reactions, better branch checkout
- Keeping our selective snapshot update logic with validation
- Keeping our workflow summary generation
- Combined both sets of improvements for a robust solution

Fixed eslint configuration issue where vite.config.mts was in both allowDefaultProject and tsconfig.json
2025-10-12 20:27:25 -07:00

90 lines
2.1 KiB
Python

from __future__ import annotations
class ErrorRaiseNode:
@classmethod
def INPUT_TYPES(cls):
return {"required": {}}
RETURN_TYPES = ("IMAGE",)
FUNCTION = "raise_error"
CATEGORY = "DevTools"
DESCRIPTION = "Raise an error for development purposes"
def raise_error(self):
raise Exception("Error node was called!")
class ErrorRaiseNodeWithMessage:
@classmethod
def INPUT_TYPES(cls):
return {"required": {"message": ("STRING", {"multiline": True})}}
RETURN_TYPES = ()
OUTPUT_NODE = True
FUNCTION = "raise_error"
CATEGORY = "DevTools"
DESCRIPTION = "Raise an error with message for development purposes"
def raise_error(self, message: str):
raise Exception(message)
class ExperimentalNode:
@classmethod
def INPUT_TYPES(cls):
return {"required": {}}
RETURN_TYPES = ()
OUTPUT_NODE = True
FUNCTION = "experimental_function"
CATEGORY = "DevTools"
DESCRIPTION = "A experimental node"
EXPERIMENTAL = True
def experimental_function(self):
print("Experimental node was called!")
class DeprecatedNode:
@classmethod
def INPUT_TYPES(cls):
return {"required": {}}
RETURN_TYPES = ()
OUTPUT_NODE = True
FUNCTION = "deprecated_function"
CATEGORY = "DevTools"
DESCRIPTION = "A deprecated node"
DEPRECATED = True
def deprecated_function(self):
print("Deprecated node was called!")
NODE_CLASS_MAPPINGS = {
"DevToolsErrorRaiseNode": ErrorRaiseNode,
"DevToolsErrorRaiseNodeWithMessage": ErrorRaiseNodeWithMessage,
"DevToolsExperimentalNode": ExperimentalNode,
"DevToolsDeprecatedNode": DeprecatedNode,
}
NODE_DISPLAY_NAME_MAPPINGS = {
"DevToolsErrorRaiseNode": "Raise Error",
"DevToolsErrorRaiseNodeWithMessage": "Raise Error with Message",
"DevToolsExperimentalNode": "Experimental Node",
"DevToolsDeprecatedNode": "Deprecated Node",
}
__all__ = [
"ErrorRaiseNode",
"ErrorRaiseNodeWithMessage",
"ExperimentalNode",
"DeprecatedNode",
"NODE_CLASS_MAPPINGS",
"NODE_DISPLAY_NAME_MAPPINGS",
]