refactor(manager): 使用 List 类型替代 list,增强类型一致性
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
"""提供 Platform IO 层的中心 Broker 管理器。"""
|
"""提供 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 hashlib
|
||||||
import json
|
import json
|
||||||
@@ -59,7 +59,7 @@ class PlatformIOManager:
|
|||||||
if self._started:
|
if self._started:
|
||||||
return
|
return
|
||||||
|
|
||||||
started_drivers: list[PlatformIODriver] = []
|
started_drivers: List[PlatformIODriver] = []
|
||||||
try:
|
try:
|
||||||
for driver in self._driver_registry.list():
|
for driver in self._driver_registry.list():
|
||||||
await driver.start()
|
await driver.start()
|
||||||
@@ -86,7 +86,7 @@ class PlatformIOManager:
|
|||||||
if not self._started:
|
if not self._started:
|
||||||
return
|
return
|
||||||
|
|
||||||
stop_errors: list[str] = []
|
stop_errors: List[str] = []
|
||||||
for driver in reversed(self._driver_registry.list()):
|
for driver in reversed(self._driver_registry.list()):
|
||||||
try:
|
try:
|
||||||
await driver.stop()
|
await driver.stop()
|
||||||
|
|||||||
Reference in New Issue
Block a user