fix: auto-fix code issues (cron)

- 修复重复导入/字段
- 修复异常处理
- 修复PEP8格式问题
- 添加类型注解
This commit is contained in:
AutoFix Bot
2026-03-03 06:03:38 +08:00
parent 2a0ed6af4d
commit 9fd1da8fb7
41 changed files with 901 additions and 768 deletions

View File

@@ -352,7 +352,7 @@ class CollaborationManager:
is_active=bool(row[10]),
allow_download=bool(row[11]),
allow_export=bool(row[12]),
)
),
)
return shares
@@ -435,7 +435,7 @@ class CollaborationManager:
self.db.conn.commit()
def get_comments(
self, target_type: str, target_id: str, include_resolved: bool = True
self, target_type: str, target_id: str, include_resolved: bool = True,
) -> list[Comment]:
"""获取评论列表"""
if not self.db:
@@ -554,7 +554,7 @@ class CollaborationManager:
return cursor.rowcount > 0
def get_project_comments(
self, project_id: str, limit: int = 50, offset: int = 0
self, project_id: str, limit: int = 50, offset: int = 0,
) -> list[Comment]:
"""获取项目下的所有评论"""
if not self.db: