fix: deprecated typings
This commit is contained in:
@@ -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.
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user