chore: Remove deprecated type aliases and run as pre-commit (#79)

Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>
This commit is contained in:
Michele Dolfi
2025-03-07 15:46:52 +01:00
committed by GitHub
parent c95db36438
commit 7e75919ae8
10 changed files with 38 additions and 34 deletions

View File

@@ -1,7 +1,7 @@
import asyncio
import logging
import uuid
from typing import Dict, List, Optional, Set
from typing import Optional
from fastapi import WebSocket
@@ -30,9 +30,9 @@ class TaskNotFoundError(OrchestratorError):
class AsyncLocalOrchestrator(BaseOrchestrator):
def __init__(self):
self.task_queue = asyncio.Queue()
self.tasks: Dict[str, Task] = {}
self.queue_list: List[str] = []
self.task_subscribers: Dict[str, Set[WebSocket]] = {}
self.tasks: dict[str, Task] = {}
self.queue_list: list[str] = []
self.task_subscribers: dict[str, set[WebSocket]] = {}
async def enqueue(self, request: ConvertDocumentsRequest) -> Task:
task_id = str(uuid.uuid4())