Files
xiaoxia-saas/pyproject.toml
T
CI Bot 6cbd08f666
CI/CD Pipeline / Production Browser E2E (pull_request) Failing after 1526h35m2s
CI/CD Pipeline / Staging E2E Tests (pull_request) Failing after 1526h35m3s
CI/CD Pipeline / Deploy Production (pull_request) Failing after 1526h35m3s
CI/CD Pipeline / Build Production Web Image (pull_request) Failing after 1526h35m3s
CI/CD Pipeline / Build Production Worker Image (pull_request) Failing after 1526h35m3s
CI/CD Pipeline / Build Staging Web Image (pull_request) Failing after 1526h35m3s
CI/CD Pipeline / Build Staging Worker Image (pull_request) Failing after 1526h35m3s
CI/CD Pipeline / Build Staging API Image (pull_request) Failing after 1526h35m3s
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been skipped
CI/CD Pipeline / Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / Frontend Lint (pull_request) Has been skipped
CI/CD Pipeline / Staging API Integration Tests (pull_request) Failing after 1527h6m43s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Failing after 1527h6m43s
CI/CD Pipeline / Build Production API Image (pull_request) Failing after 1527h6m43s
fix(code-quality): 第一批代码质量修复 - 零风险项
- 修复 ruff 配置:移除已废弃规则 W503/E704(ruff 0.14+ 不兼容)
- 修复 F541 (13处):f-string 无占位符改为普通字符串
- 修复 B017 (1处):pytest.raises(Exception) 改为 ValidationError
- 修复 vulture 死代码:trim_engine 中 if False 的三元表达式
- 修复 mypy var-annotated:SUNSET_VERSIONS 加类型标注
2026-07-15 00:51:36 +08:00

102 lines
1.9 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.black]
line-length = 120
target-version = ["py312"]
extend-exclude = '''
(
\.git
| \.cache
| \.pytest_cache
| \.mypy_cache
| __pycache__
| node_modules
| \.venv
| venv
| build
| dist
| \.next
| out
| coverage
)
'''
[tool.isort]
profile = "black"
line_length = 120
extend_skip_glob = [
".git/**",
".cache/**",
".pytest_cache/**",
".mypy_cache/**",
"__pycache__/**",
"node_modules/**",
".venv/**",
"venv/**",
"build/**",
"dist/**",
".next/**",
"out/**",
"coverage/**",
]
[tool.coverage.run]
source = ["apps/api/app", "packages"]
omit = [
"*/migrations/*",
"*/tests/*",
"*/test_*.py",
"*/site-packages/*",
]
branch = true
[tool.ruff]
target-version = "py311"
line-length = 120
exclude = [
".git",
".cache",
"__pycache__",
".venv",
"venv",
"node_modules",
"alembic",
".gitea",
".next",
"dist",
"build",
]
[tool.ruff.lint]
# 当前阶段:摸底模式,规则集与原flake8对齐
# 后续迭代计划:
# Phase 1: 修完 bugbear 后正式替换 flake8
# Phase 2: 启用 UP(pyupgrade) + SIM(simplify)
# Phase 3: 启用 RET(return) + ARG(unused-args)
select = [
"E", # pycodestyle errors(同flake8)
"F", # pyflakes(同flake8)
"W", # pycodestyle warnings(同flake8)
"B", # flake8-bugbear(新增,摸底用)
]
# 与原 setup.cfg flake8 配置对齐,确保不新增阻断
ignore = [
"E203",
"E501", # line-too-long(black管)
"E302",
"E402", # module-import-not-at-top(循环导入多)
"E722", # bare-except
"W291",
"W293",
"F401", # unused-import
"F403",
"F405",
"F841", # unused-variable
"B008", # do-not-perform-callback-from-arg(fastapi依赖注入)
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401", "F403", "F405"]
"tests/*" = ["E402", "F401", "F841"]
"packages/ports/*" = ["E301"]
"apps/*/migrations/*" = ["ALL"]
"alembic/*" = ["ALL"]