Files
xiaoxia-saas/pyproject.toml
xiaoxia a88fae4084
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 28s
CI/CD Pipeline / Validate - Type Check (mypy) (pull_request) Successful in 1m11s
CI/CD Pipeline / PR Build Web Image (pull_request) Successful in 39s
CI/CD Pipeline / PR Build API Image (pull_request) Successful in 1m2s
CI/CD Pipeline / Frontend Lint (pull_request) Successful in 1m20s
CI/CD Pipeline / Validate - Migration (alembic) (pull_request) Successful in 1m28s
Preview Deploy / Deploy Preview Environment (pull_request) Failing after 29s
AI Code Review / AI Code Review (pull_request) Successful in 1m20s
CI/CD Pipeline / Validate - Code Quality (pull_request) Successful in 4m30s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 4m42s
CI/CD Pipeline / Unit Tests (pull_request) Successful in 3m53s
CI/CD Pipeline / PR Build Worker Image (pull_request) Successful in 11m9s
CI/CD Pipeline / Integration Tests (pull_request) Successful in 2m40s
CI/CD Pipeline / Canary Release to Production (pull_request) Has been cancelled
CI/CD Pipeline / CI Gate (pull_request) Successful in 36s
CI/CD Pipeline / Production Browser E2E (pull_request) Failing after 14m45s
ACR Cleanup / ACR Image Cleanup (pull_request_target) Successful in 22s
Preview Cleanup / Cleanup Preview Environment (pull_request) Successful in 27s
CI/CD Pipeline / ACR Image Cleanup (pull_request) Failing after 1202h25m37s
CI/CD Pipeline / Staging E2E Tests (pull_request) Failing after 1202h25m39s
CI/CD Pipeline / Deploy Production (pull_request) Failing after 1202h25m41s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Failing after 1202h28m39s
CI/CD Pipeline / Build Production API Image (pull_request) Failing after 1202h29m49s
CI/CD Pipeline / Build Production Worker Image (pull_request) Failing after 1202h29m45s
CI/CD Pipeline / Frontend Unit Tests (pull_request) Failing after 1202h29m51s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Failing after 1202h36m45s
CI/CD Pipeline / Build Staging Worker Image (pull_request) Failing after 1202h36m47s
CI/CD Pipeline / Build Staging Web Image (pull_request) Failing after 1202h36m49s
CI/CD Pipeline / Build Staging API Image (pull_request) Failing after 1202h36m51s
CI/CD Pipeline / Staging API Integration Tests (pull_request) Failing after 1202h58m35s
CI/CD Pipeline / Build Production Web Image (pull_request) Failing after 1203h2m43s
fix(ci): pyproject.toml添加原生ruff配置,修复Code Quality全量检查失败
问题:ruff未正确读取setup.cfg中flake8的extend-ignore配置,
导致全量Code Quality检查产生149个误报(主要为F401未使用导入)。

修复:
1. 在pyproject.toml中添加[tool.ruff]原生配置,与原setup.cfg规则对齐
2. 修复apps/api/app/middleware/auth.py中缺失的HTTPException导入(1个真实F821)

结果:全量ruff检查从149错误降至0错误
2026-07-28 12:41:59 +08:00

50 lines
860 B
TOML
Raw Permalink 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.black]
line-length = 120
target-version = ["py312"]
[tool.isort]
profile = "black"
line_length = 120
[tool.ruff]
target-version = "py311"
line-length = 120
exclude = [
".git",
"__pycache__",
".venv",
"venv",
"node_modules",
"alembic",
".gitea",
".next",
"dist",
"build",
"hostexecutor",
]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors(同 flake8 默认)
"F", # pyflakes(同 flake8 默认)
]
ignore = [
"E203",
"E501", # line-too-long(black管)
"E302",
"E402", # module-import-not-at-top(循环导入多)
"E722", # bare-except
"W291",
"W293",
"F401",
"F403",
"F405",
"F841",
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401", "F403", "F405"]
"tests/**" = ["E402", "F401", "F821", "F841"]
"packages/ports/*" = ["E301"]
"apps/api/app/api/routes/auth.py" = ["ALL"]