mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-09-10 11:35:40 +00:00
Change validate_inputs' output typehint to 'bool | str' and update docstrings (#9786)
This commit is contained in:
@@ -1190,13 +1190,18 @@ class _ComfyNodeBaseInternal(_ComfyNodeInternal):
|
|||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def validate_inputs(cls, **kwargs) -> bool:
|
def validate_inputs(cls, **kwargs) -> bool | str:
|
||||||
"""Optionally, define this function to validate inputs; equivalent to V1's VALIDATE_INPUTS."""
|
"""Optionally, define this function to validate inputs; equivalent to V1's VALIDATE_INPUTS.
|
||||||
|
|
||||||
|
If the function returns a string, it will be used as the validation error message for the node.
|
||||||
|
"""
|
||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def fingerprint_inputs(cls, **kwargs) -> Any:
|
def fingerprint_inputs(cls, **kwargs) -> Any:
|
||||||
"""Optionally, define this function to fingerprint inputs; equivalent to V1's IS_CHANGED."""
|
"""Optionally, define this function to fingerprint inputs; equivalent to V1's IS_CHANGED.
|
||||||
|
|
||||||
|
If this function returns the same value as last run, the node will not be executed."""
|
||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
Reference in New Issue
Block a user