feat: pydantic descriptors

This commit is contained in:
TheNoxium
2025-10-06 19:13:55 +05:00
parent 8e01072ff6
commit 46d9381905
28 changed files with 589 additions and 582 deletions

View File

@@ -1,11 +1,11 @@
from typing import Dict, Any
from core import VorkNode
from core.form_descriptors import get_form_descriptor
from model_nodes.node_switch_models import (
SwitchNodeData,
SwitchNodeLinks,
SwitchNodeCoreSchema,
SwitchNodeCoreSchemaData
SwitchNodeCoreSchemaData,
SWITCH_FORM_DESCRIPTOR,
)
@@ -26,7 +26,7 @@ class VorkNodeSwitch(VorkNode):
"""
Возвращает статический дескриптор формы для узла Switch
"""
return get_form_descriptor("SWITCH")
return SWITCH_FORM_DESCRIPTOR
def validate(self) -> SwitchNodeCoreSchema:
"""