ruff fix但指定了--unsafe-fixes

This commit is contained in:
minecraft1024a
2025-10-05 21:48:32 +08:00
committed by Windpicker-owo
parent 04feb585b4
commit 2a89efe47a
76 changed files with 301 additions and 316 deletions

View File

@@ -312,7 +312,7 @@ class AdaptiveStreamManager:
# 事件循环延迟
event_loop_lag = 0.0
try:
loop = asyncio.get_running_loop()
asyncio.get_running_loop()
start_time = time.time()
await asyncio.sleep(0)
event_loop_lag = time.time() - start_time

View File

@@ -516,7 +516,7 @@ class StreamLoopManager:
async def _wait_for_task_cancel(self, stream_id: str, task: asyncio.Task) -> None:
"""等待任务取消完成,带有超时控制
Args:
stream_id: 流ID
task: 要等待取消的任务
@@ -533,12 +533,12 @@ class StreamLoopManager:
async def _force_dispatch_stream(self, stream_id: str) -> None:
"""强制分发流处理
当流的未读消息超过阈值时,强制触发分发处理
这个方法主要用于突破并发限制时的紧急处理
注意:此方法目前未被使用,相关功能已集成到 start_stream_loop 方法中
Args:
stream_id: 流ID
"""

View File

@@ -144,9 +144,9 @@ class MessageManager:
self,
stream_id: str,
message_id: str,
interest_value: float = None,
actions: list = None,
should_reply: bool = None,
interest_value: float | None = None,
actions: list | None = None,
should_reply: bool | None = None,
):
"""更新消息信息"""
try: