fix ruff again

This commit is contained in:
UnCLAS-Prommer
2025-07-08 23:43:15 +08:00
parent fe1f696f80
commit 2bbf5e1c59

View File

@@ -304,7 +304,7 @@ class NormalChat:
semaphore = asyncio.Semaphore(5) semaphore = asyncio.Semaphore(5)
async def process_and_acquire(msg_id, message, interest_value, is_mentioned): async def process_and_acquire(msg_id, message, interest_value, is_mentioned, semaphore):
"""处理单个兴趣消息并管理信号量""" """处理单个兴趣消息并管理信号量"""
async with semaphore: async with semaphore:
try: try:
@@ -334,7 +334,7 @@ class NormalChat:
self.interest_dict.pop(msg_id, None) self.interest_dict.pop(msg_id, None)
tasks = [ tasks = [
process_and_acquire(msg_id, message, interest_value, is_mentioned) process_and_acquire(msg_id, message, interest_value, is_mentioned, semaphore)
for msg_id, (message, interest_value, is_mentioned) in items_to_process for msg_id, (message, interest_value, is_mentioned) in items_to_process
] ]