This commit is contained in:
Lex Darlog (DRL)
2026-04-20 23:42:01 -03:00
parent e13024cd2c
commit 7f018e27b1
3 changed files with 12 additions and 6 deletions
+8
View File
@@ -0,0 +1,8 @@
# encoding: utf-8
"""
"""
from typing import TypeVar as _TypeVar
T = _TypeVar('T')
T2 = _TypeVar('T2')
+3 -5
View File
@@ -10,9 +10,7 @@ try:
except ImportError:
from comfy.comfy_types.node_typing import StrEnum as _StrEnum
T = _t.TypeVar('T')
T2 = _t.TypeVar('T2')
from .__typing import T as _T
class __BaseEnum(_StrEnum):
@@ -26,7 +24,7 @@ class DataTypes(__BaseEnum):
DICT = 'DICT'
@staticmethod
def __custom_input_type_dict(_dict_args: _t.Tuple[_t.Dict[str, T], ...], kwargs: _t.Dict[str, T]) -> _t.Dict[str, T]:
def __custom_input_type_dict(_dict_args: _t.Tuple[_t.Dict[str, _T], ...], kwargs: _t.Dict[str, _T]) -> _t.Dict[str, _T]:
res_dict: _t.Dict[str, _t.Any] = {"forceInput": True}
for d in _dict_args:
if d is not None:
@@ -35,5 +33,5 @@ class DataTypes(__BaseEnum):
return res_dict
@classmethod
def input_dict(cls, *_dicts: _t.Dict[str, T], **kwargs: T) -> _t.Tuple[_t.Union['DataTypes', str], _t.Dict[str, T]]:
def input_dict(cls, *_dicts: _t.Dict[str, _T], **kwargs: _T) -> _t.Tuple[_t.Union['DataTypes', str], _t.Dict[str, _T]]:
return str(cls.DICT), cls.__custom_input_type_dict(_dicts, kwargs)
+1 -1
View File
@@ -11,7 +11,7 @@ from frozendict import deepfreeze as _deepfreeze, frozendict as _frozendict
from server import PromptServer as _PromptServer
from .enums import T as _T, T2 as _T2
from .__typing import T as _T, T2 as _T2
def _show_text_on_node(text: str = None, unique_id: str = None):