fix: auto-fix code issues (cron)

- 修复重复导入/字段 (llm_client.py 中的重复注释)
- 修复PEP8格式问题 (E501行长度超过100字符)
- 修复多行SQL语句和字符串格式化
- 修复f-string过长问题

涉及文件:
- backend/developer_ecosystem_manager.py
- backend/document_processor.py
- backend/enterprise_manager.py
- backend/export_manager.py
- backend/growth_manager.py
- backend/llm_client.py
- backend/localization_manager.py
- backend/main.py
- backend/neo4j_manager.py
- backend/ops_manager.py
- backend/performance_manager.py
- backend/plugin_manager.py
- backend/search_manager.py
- backend/security_manager.py
- backend/subscription_manager.py
- backend/tenant_manager.py
- backend/test_phase8_task6.py
- backend/test_phase8_task8.py
- backend/tingwu_client.py
- backend/workflow_manager.py
This commit is contained in:
AutoFix Bot
2026-03-04 03:19:02 +08:00
parent e108f83cd9
commit 0869fec587
20 changed files with 222 additions and 115 deletions

View File

@@ -153,20 +153,21 @@ class ExportManager:
y2 = y2 - dy * offset / dist
svg_parts.append(
f'<line x1 = "{x1}" y1 = "{y1}" x2 = "{x2}" y2 = "{y2}" '
f'stroke = "#7f8c8d" stroke-width = "2" marker-end = "url(#arrowhead)" opacity = "0.6"/>',
f'<line x1="{x1}" y1="{y1}" x2="{x2}" y2="{y2}" '
f'stroke="#7f8c8d" stroke-width="2" '
f'marker-end="url(#arrowhead)" opacity="0.6"/>',
)
# 关系标签
mid_x = (x1 + x2) / 2
mid_y = (y1 + y2) / 2
svg_parts.append(
f'<rect x = "{mid_x - 30}" y = "{mid_y - 10}" width = "60" height = "20" '
f'fill = "white" stroke = "#bdc3c7" rx = "3"/>',
f'<rect x="{mid_x - 30}" y="{mid_y - 10}" width="60" height="20" '
f'fill="white" stroke="#bdc3c7" rx="3"/>',
)
svg_parts.append(
f'<text x = "{mid_x}" y = "{mid_y + 5}" text-anchor = "middle" '
f'font-size = "10" fill = "#2c3e50">{rel.relation_type}</text>',
f'<text x="{mid_x}" y="{mid_y + 5}" text-anchor="middle" '
f'font-size="10" fill="#2c3e50">{rel.relation_type}</text>',
)
# 绘制实体节点
@@ -177,19 +178,21 @@ class ExportManager:
# 节点圆圈
svg_parts.append(
f'<circle cx = "{x}" cy = "{y}" r = "35" fill = "{color}" stroke = "white" stroke-width = "3"/>',
f'<circle cx="{x}" cy="{y}" r="35" fill="{color}" '
f'stroke="white" stroke-width="3"/>',
)
# 实体名称
svg_parts.append(
f'<text x = "{x}" y = "{y + 5}" text-anchor = "middle" font-size = "12" '
f'font-weight = "bold" fill = "white">{entity.name[:8]}</text>',
f'<text x="{x}" y="{y + 5}" text-anchor="middle" '
f'font-size="12" font-weight="bold" fill="white">'
f'{entity.name[:8]}</text>',
)
# 实体类型
svg_parts.append(
f'<text x = "{x}" y = "{y + 55}" text-anchor = "middle" font-size = "10" '
f'fill = "#7f8c8d">{entity.type}</text>',
f'<text x="{x}" y="{y + 55}" text-anchor="middle" '
f'font-size="10" fill="#7f8c8d">{entity.type}</text>',
)
# 图例