fix(typing): resolve mypy errors in schemas.controller.templates.iou_templates

This commit is contained in:
Mark Paronyan committed 2026-09-29 09:23:13 +03:00
1 parent b9192438c9
commit 94a0f462bf
2 files changed
+8 -5

No files matched your search

@@ -22,11 +22,11 @@ from pydantic import Field
from typing import Optional
class IOUTemplate(TemplateBase):
class IOUTemplateBase(TemplateBase):
category: Optional[Category] = Category.router
default_name_format: Optional[str] = "IOU{0}"
symbol: Optional[str] = "multilayer_switch"
path: str = Field(..., description="Path of IOU executable")
path: Optional[str] = Field(None, description="Path of IOU executable")
ethernet_adapters: Optional[int] = Field(2, ge=0, description="Number of ethernet adapters")
serial_adapters: Optional[int] = Field(2, ge=0, description="Number of serial adapters")
ram: Optional[int] = Field(1024, gt=0, description="Amount of RAM in MB")
@@ -44,5 +44,9 @@ class IOUTemplate(TemplateBase):
)
class IOUTemplateUpdate(IOUTemplate):
path: Optional[str] = Field(None, description="Path of IOU executable")
class IOUTemplate(IOUTemplateBase):
path: str = Field(..., description="Path of IOU executable")
class IOUTemplateUpdate(IOUTemplateBase):
pass