fix: auto-fix code issues (cron)

- 修复重复导入/字段
- 修复异常处理
- 修复PEP8格式问题
- 添加类型注解
This commit is contained in:
OpenClaw Bot
2026-02-28 03:03:50 +08:00
parent 8c80399c9d
commit 33555642db
39 changed files with 86 additions and 1151 deletions

View File

@@ -15,7 +15,6 @@ import numpy as np
KIMI_API_KEY = os.getenv("KIMI_API_KEY", "")
KIMI_BASE_URL = os.getenv("KIMI_BASE_URL", "https://api.kimi.com/coding")
@dataclass
class EntityEmbedding:
entity_id: str
@@ -23,7 +22,6 @@ class EntityEmbedding:
definition: str
embedding: list[float]
class EntityAligner:
"""实体对齐器 - 使用 embedding 进行相似度匹配"""
@@ -303,7 +301,6 @@ class EntityAligner:
return []
# 简单的字符串相似度计算(不使用 embedding
def simple_similarity(str1: str, str2: str) -> float:
"""
@@ -335,7 +332,6 @@ def simple_similarity(str1: str, str2: str) -> float:
return SequenceMatcher(None, s1, s2).ratio()
if __name__ == "__main__":
# 测试
aligner = EntityAligner()