fix: auto-fix code issues (cron)
- 修复重复导入/字段 - 修复异常处理 - 修复PEP8格式问题 - 添加类型注解 自动修复统计: - 修复了1177个格式问题 - 删除了多余的空行 - 清理了行尾空格 - 移除了重复导入和未使用的导入
This commit is contained in:
@@ -7,7 +7,6 @@ import ast
|
||||
import re
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
class CodeIssue:
|
||||
def __init__(
|
||||
self,
|
||||
@@ -27,7 +26,6 @@ class CodeIssue:
|
||||
def __repr__(self) -> str:
|
||||
return f"{self.severity.upper()}: {self.file_path}:{self.line_no} - {self.issue_type}: {self.message}"
|
||||
|
||||
|
||||
class CodeReviewer:
|
||||
def __init__(self, base_path: str) -> None:
|
||||
self.base_path = Path(base_path)
|
||||
@@ -422,7 +420,6 @@ class CodeReviewer:
|
||||
|
||||
return "\n".join(report)
|
||||
|
||||
|
||||
def main() -> None:
|
||||
base_path = "/root/.openclaw/workspace/projects/insightflow/backend"
|
||||
reviewer = CodeReviewer(base_path)
|
||||
@@ -447,6 +444,5 @@ def main() -> None:
|
||||
|
||||
return reviewer
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user