Replace deprecated typing aliases

This commit is contained in:
Josh Wu
2025-06-07 23:29:26 +08:00
parent 3a64772cc5
commit 8a0cd5d0d1
68 changed files with 366 additions and 424 deletions

View File

@@ -27,11 +27,8 @@ from typing import (
Any,
Awaitable,
Callable,
List,
Optional,
Protocol,
Set,
Tuple,
TypeVar,
Union,
overload,
@@ -156,7 +153,7 @@ class EventWatcher:
```
'''
handlers: List[Tuple[pyee.EventEmitter, str, Callable[..., Any]]]
handlers: list[tuple[pyee.EventEmitter, str, Callable[..., Any]]]
def __init__(self) -> None:
self.handlers = []
@@ -329,7 +326,7 @@ class AsyncRunner:
default_queue = WorkQueue()
# Shared set of running tasks
running_tasks: Set[Awaitable] = set()
running_tasks: set[Awaitable] = set()
@staticmethod
def run_in_task(queue=None):