fix: deprecated typings

This commit is contained in:
TheNoxium
2025-11-18 12:12:58 +05:00
parent 0330356ea2
commit a70973032f
30 changed files with 147 additions and 180 deletions

View File

@@ -1,4 +1,4 @@
from typing import Optional, Dict, Any
from typing import Any
from sqlalchemy.ext.asyncio import AsyncConnection
from orm.tables.process import ProcessStatus
@@ -25,13 +25,13 @@ class ProcessSchemaService:
def __init__(self, connection: AsyncConnection):
self.connection = connection
async def list(self, filter_dto: ProcessSchemaFilterDTO) -> Optional[AllProcessSchemaResponse]:
async def list(self, filter_dto: ProcessSchemaFilterDTO) -> AllProcessSchemaResponse | None:
"""
Получает список схем процессов с пагинацией и фильтрацией.
"""
return await get_process_schema_page_DTO(self.connection, filter_dto)
async def get(self, process_schema_id: int) -> Optional[ProcessSchemaResponse]:
async def get(self, process_schema_id: int) -> ProcessSchemaResponse | None:
"""
Получает схему процесса по ID со всеми нодами и линками.
"""
@@ -66,7 +66,7 @@ class ProcessSchemaService:
nodes=nodes_response,
)
async def create(self, creator_id: int) -> Dict[str, Any]:
async def create(self, creator_id: int) -> dict[str, Any]:
"""
Создаёт новую схему процесса с начальной нодой LISTEN.
"""