Files
xiaoxia-saas/pyproject.toml
T
CI Bot 19edd9aa85
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Failing after 35s
CI/CD Pipeline / Unit Tests (pull_request) Successful in 1m28s
CI/CD Pipeline / Frontend Lint (pull_request) Successful in 1m29s
CI/CD Pipeline / Build Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Web Image (pull_request) Has been skipped
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Has been skipped
CI/CD Pipeline / Staging API Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / Deploy Production (pull_request) Has been skipped
CI/CD Pipeline / Staging E2E Tests (pull_request) Has been skipped
CI/CD Pipeline / Production Browser E2E (pull_request) Has been skipped
CI/CD Pipeline / Integration Tests (pull_request) Has been cancelled
feat(ci): 代码质量深度加固 - mypy/ruff/vulture 接入
- ruff 替换 flake8:增加 bugbear/pyupgrade/simplify/return 等规则集
  * 自动修复34个问题(未使用import/格式等)
  * 手动修复10个F841未使用变量 + 2个E722裸except
- mypy 类型检查:告警模式接入Validate,不阻断CI
  * 检查范围:apps/api/app + packages核心业务代码
  * 配置:ignore-missing-imports + explicit-package-bases
- vulture 死代码扫描升级:
  * 置信度阈值从80%降到70%,输出更多参考
  * 按size排序,便于人工审查高价值条目
  * 告警模式不阻断CI
- 新增 pyproject.toml:ruff 集中配置
- 修复F841未使用变量(10处)+ E722裸except(2处)
2026-07-14 17:38:13 +08:00

38 lines
1.1 KiB
TOML
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
[tool.ruff]
target-version = "py311"
line-length = 120
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"F", # pyflakes
"W", # pycodestyle warnings
"I", # isort
"B", # flake8-bugbear
"UP", # pyupgrade
"SIM", # flake8-simplify
"RET", # flake8-return
"ARG", # flake8-unused-arguments
]
ignore = [
"E402", # module-import-not-at-top-of-file(循环导入导致的延迟导入很多)
"E501", # line-too-longblack已经管了)
"UP006", # use-list-type (太多了,3.9+才支持,项目目标3.11但历史代码多)
"UP007", # use-union-type
"B008", # do-not-perform-callback-from-arg (fastapi依赖注入常用)
"ARG001",# unused-function-argument (接口方法参数多,框架注入)
"ARG002",# unused-method-argument
"RET501",# do-not-use-return-None
"RET502",# do-not-implicitly-return-None
"SIM108",# use-ternary-operator (可读性考虑)
]
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["B011", "S101"]
"apps/*/migrations/*" = ["ALL"]
"alembic/*" = ["ALL"]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"