From e5e5b5ca096fa0cc9bf8455b372db567a79df337 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A2=A8=E6=A2=93=E6=9F=92?= <1787882683@qq.com> Date: Thu, 17 Apr 2025 09:39:53 +0800 Subject: [PATCH] fix: Ruff --- src/do_tool/tool_use.py | 2 +- src/plugins/chat/utils.py | 2 +- src/plugins/willing/mode_llmcheck.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/do_tool/tool_use.py b/src/do_tool/tool_use.py index b323f0452..1f618e385 100644 --- a/src/do_tool/tool_use.py +++ b/src/do_tool/tool_use.py @@ -62,7 +62,7 @@ class ToolUser: prompt = "" prompt += mid_memory_info prompt += "你正在思考如何回复群里的消息。\n" - prompt += f"之前群里进行了如下讨论:\n" + prompt += "之前群里进行了如下讨论:\n" prompt += chat_talking_prompt prompt += f"你注意到{sender_name}刚刚说:{message_txt}\n" prompt += f"注意你就是{bot_name},{bot_name}是你的名字。根据之前的聊天记录补充问题信息,搜索时避开你的名字。\n" diff --git a/src/plugins/chat/utils.py b/src/plugins/chat/utils.py index 55f21eb2a..700377b79 100644 --- a/src/plugins/chat/utils.py +++ b/src/plugins/chat/utils.py @@ -815,7 +815,7 @@ def parse_text_timestamps(text: str, mode: str = "normal") -> str: # 从后向前替换,避免位置改变 converted_timestamps.reverse() - for ts, match, readable_time in converted_timestamps: + for match, readable_time in converted_timestamps: pattern_instance = re.escape(match.group(0)) if readable_time in readable_time_used: # 如果相同格式的时间已存在,替换为空字符串 diff --git a/src/plugins/willing/mode_llmcheck.py b/src/plugins/willing/mode_llmcheck.py index 0109f0c53..7820dba9c 100644 --- a/src/plugins/willing/mode_llmcheck.py +++ b/src/plugins/willing/mode_llmcheck.py @@ -14,9 +14,9 @@ import time from loguru import logger from ..models.utils_model import LLM_request from ...config.config import global_config -from ..chat.chat_stream import ChatStream +# from ..chat.chat_stream import ChatStream from ..chat.utils import get_recent_group_detailed_plain_text -from .willing_manager import BaseWillingManager +# from .willing_manager import BaseWillingManager from .mode_mxp import MxpWillingManager import re from functools import wraps