ruff fix但指定了--unsafe-fixes
This commit is contained in:
@@ -13,10 +13,9 @@ __all__ = [
|
||||
"BotInterestManager",
|
||||
"BotInterestTag",
|
||||
"BotPersonalityInterests",
|
||||
"InterestMatchResult",
|
||||
"bot_interest_manager",
|
||||
|
||||
# 消息兴趣值计算管理
|
||||
"InterestManager",
|
||||
"InterestMatchResult",
|
||||
"bot_interest_manager",
|
||||
"get_interest_manager",
|
||||
]
|
||||
|
||||
@@ -429,7 +429,7 @@ class BotInterestManager:
|
||||
except Exception as e:
|
||||
logger.error(f"❌ 计算相似度分数失败: {e}")
|
||||
|
||||
async def calculate_interest_match(self, message_text: str, keywords: list[str] = None) -> InterestMatchResult:
|
||||
async def calculate_interest_match(self, message_text: str, keywords: list[str] | None = None) -> InterestMatchResult:
|
||||
"""计算消息与机器人兴趣的匹配度"""
|
||||
if not self.current_interests or not self._initialized:
|
||||
raise RuntimeError("❌ 兴趣标签系统未初始化")
|
||||
@@ -825,7 +825,7 @@ class BotInterestManager:
|
||||
"cache_size": len(self.embedding_cache),
|
||||
}
|
||||
|
||||
async def update_interest_tags(self, new_personality_description: str = None):
|
||||
async def update_interest_tags(self, new_personality_description: str | None = None):
|
||||
"""更新兴趣标签"""
|
||||
try:
|
||||
if not self.current_interests:
|
||||
|
||||
Reference in New Issue
Block a user