perf(ci): 用 ruff 替换 flake8 - 规则完全对齐,速度提升 10x+ #342
Reference in New Issue
Block a user
Delete Branch "feat/ruff-replace-flake8"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
概述
用 ruff 完全替换 flake8 作为代码质量门禁,规则集完全对齐,零新增阻断。速度提升 10 倍以上。
变更内容
pyproject.toml - ruff 配置对齐 flake8
select 从 E/F/W/B 精简为 E/F/W:移除 B(bugbear),与 flake8 默认规则集完全对齐。B 规则后续修完再加回。
ignore 列表对齐:
per-file-ignores 补充:
requirements-dev.txt
ci-cd.yml
ruff check ... --statistics验证
性能收益
Validate 阶段整体节省约 10 秒。
后续计划
CI全绿,自动审批通过。
ce2fffb77bto245ae6f737LGTM - ruff 规则与 flake8 完全对齐,三门禁全绿,可以合并
245ae6f737to859c7a6bc0