refactor(manager): 使用 List 类型替代 list,增强类型一致性

This commit is contained in:
DrSmoothl
2026-03-20 01:20:22 +08:00
parent 04f260e570
commit 07256182fb

View File

@@ -1,6 +1,6 @@
"""提供 Platform IO 层的中心 Broker 管理器。"""
from typing import TYPE_CHECKING, Any, Awaitable, Callable, Dict, Optional
from typing import TYPE_CHECKING, Any, Awaitable, Callable, Dict, List, Optional
import hashlib
import json
@@ -59,7 +59,7 @@ class PlatformIOManager:
if self._started:
return
started_drivers: list[PlatformIODriver] = []
started_drivers: List[PlatformIODriver] = []
try:
for driver in self._driver_registry.list():
await driver.start()
@@ -86,7 +86,7 @@ class PlatformIOManager:
if not self._started:
return
stop_errors: list[str] = []
stop_errors: List[str] = []
for driver in reversed(self._driver_registry.list()):
try:
await driver.stop()