修正ruff问题

This commit is contained in:
KawakazeNotFound 2025-11-06 15:14:44 +08:00
parent e293b05fa1
commit 3089bb51ae

View file

@ -345,8 +345,10 @@ async def process_messages(context_id: int, is_group: bool = True):
timeout=plugin_config.request_timeout,
)
chat_type = "群聊" if is_group else "私聊"
context_type = "群号" if is_group else "用户"
logger.info(
f"开始处理{'群聊' if is_group else '私聊'}消息 {'群号' if is_group else '用户'}{context_id} 当前队列长度:{state.queue.qsize()}"
f"开始处理{chat_type}消息 {context_type}{context_id} 当前队列长度:{state.queue.qsize()}"
)
while not state.queue.empty():
event = await state.queue.get()
@ -373,8 +375,10 @@ async def process_messages(context_id: int, is_group: bool = True):
"- 不要使用markdown或者html聊天软件不支持解析换行请用换行符。",
"- 你应该以普通人的方式发送消息,每条消息字数要尽量少一些,应该倾向于使用更多条的消息回复。",
"- 代码则不需要分段,用单独的一条消息发送。",
"- 请使用发送者的昵称称呼发送者,你可以礼貌地问候发送者,但只需要在第一次回答这位发送者的问题时问候他。",
"- 你有at群成员的能力只需要在某条消息中插入[CQ:at,qq=QQ号]也就是CQ码。at发送者是非必要的你可以根据你自己的想法at某个人。",
"- 请使用发送者的昵称称呼发送者,你可以礼貌地问候发送者,但只需要在"
"第一次回答这位发送者的问题时问候他。",
"- 你有at群成员的能力只需要在某条消息中插入[CQ:at,qq=QQ号]"
"也就是CQ码。at发送者是非必要的你可以根据你自己的想法at某个人。",
"- 你有引用某条消息的能力,使用[CQ:reply,id=消息id]来引用。",
"- 如果有多条消息,你应该优先回复提到你的,一段时间之前的就不要回复了,也可以直接选择不回复。",
"- 如果你选择完全不回复,你只需要直接输出一个<botbr>。",