fix: auto-fix code issues (cron)
- 修复PEP8格式问题(行长度超过120字符) - 修复类型注解(添加__init__和_get_db返回类型) - 删除__pycache__缓存文件 - 优化长SQL查询语句格式
This commit is contained in:
@@ -121,14 +121,17 @@ class ExportManager:
|
||||
|
||||
# 生成 SVG
|
||||
svg_parts = [
|
||||
f'<svg xmlns="http://www.w3.org/2000/svg" width="{width}" height="{height}" viewBox="0 0 {width} {height}">',
|
||||
f'<svg xmlns="http://www.w3.org/2000/svg" width="{width}" height="{height}" '
|
||||
f'viewBox="0 0 {width} {height}">',
|
||||
"<defs>",
|
||||
' <marker id="arrowhead" markerWidth="10" markerHeight="7" refX="9" refY="3.5" orient="auto">',
|
||||
' <marker id="arrowhead" markerWidth="10" markerHeight="7" '
|
||||
'refX="9" refY="3.5" orient="auto">',
|
||||
' <polygon points="0 0, 10 3.5, 0 7" fill="#7f8c8d"/>',
|
||||
" </marker>",
|
||||
"</defs>",
|
||||
f'<rect width="{width}" height="{height}" fill="#f8f9fa"/>',
|
||||
f'<text x="{center_x}" y="30" text-anchor="middle" font-size="20" font-weight="bold" fill="#2c3e50">知识图谱 - {project_id}</text>',
|
||||
f'<text x="{center_x}" y="30" text-anchor="middle" font-size="20" '
|
||||
f'font-weight="bold" fill="#2c3e50">知识图谱 - {project_id}</text>',
|
||||
]
|
||||
|
||||
# 绘制关系连线
|
||||
@@ -440,7 +443,10 @@ class ExportManager:
|
||||
story.append(Paragraph("InsightFlow 项目报告", title_style))
|
||||
story.append(Paragraph(f"项目名称: {project_name}", styles["Heading2"]))
|
||||
story.append(
|
||||
Paragraph(f"生成时间: {datetime.now().strftime('%Y-%m-%d %H:%M')}", styles["Normal"])
|
||||
Paragraph(
|
||||
f"生成时间: {datetime.now().strftime('%Y-%m-%d %H:%M')}",
|
||||
styles["Normal"],
|
||||
)
|
||||
)
|
||||
story.append(Spacer(1, 0.3 * inch))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user