fix: auto-fix code issues (cron)
- 修复重复导入/字段 - 修复异常处理 - 修复PEP8格式问题 - 添加类型注解 自动修复统计: - 修复了1177个格式问题 - 删除了多余的空行 - 清理了行尾空格 - 移除了重复导入和未使用的导入
This commit is contained in:
@@ -6,7 +6,6 @@ Auto-fix script for InsightFlow code issues
|
||||
import re
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def fix_file(filepath):
|
||||
"""Fix common issues in a Python file"""
|
||||
with open(filepath, 'r', encoding='utf-8') as f:
|
||||
@@ -75,7 +74,6 @@ def fix_file(filepath):
|
||||
return True, changes
|
||||
return False, []
|
||||
|
||||
|
||||
def main():
|
||||
backend_dir = Path('/root/.openclaw/workspace/projects/insightflow/backend')
|
||||
py_files = list(backend_dir.glob('*.py'))
|
||||
@@ -97,6 +95,5 @@ def main():
|
||||
for c in all_changes[:20]:
|
||||
print(f" {c}")
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user