156390b676
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 / Deploy Staging (Watchtower auto-deploy) (pull_request) Has been skipped
CI/CD Pipeline / Staging E2E Tests (pull_request) Has been skipped
CI/CD Pipeline / Staging API Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / ACR Image Cleanup (pull_request) Has been skipped
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 43s
CI/CD Pipeline / Validate - Type Check (mypy) (pull_request) Successful in 1m31s
AI Code Review / AI Code Review (pull_request) Successful in 1m31s
CI/CD Pipeline / Validate - Migration (alembic) (pull_request) Successful in 1m35s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Successful in 1m39s
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 2m28s
CI/CD Pipeline / Frontend Unit Tests (pull_request) Successful in 1m46s
CI/CD Pipeline / Validate - Code Quality (pull_request) Has been cancelled
CI/CD Pipeline / Unit Tests (pull_request) Has been cancelled
CI/CD Pipeline / Integration Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
CI/CD Pipeline / PR Build API Image (pull_request) Has been cancelled
CI/CD Pipeline / PR Build Web Image (pull_request) Has been cancelled
CI/CD Pipeline / PR Build Worker Image (pull_request) Has been cancelled
CI/CD Pipeline / Build Production API Image (pull_request) Has been cancelled
CI/CD Pipeline / Build Production Web Image (pull_request) Has been cancelled
CI/CD Pipeline / Build Production Worker Image (pull_request) Has been cancelled
CI/CD Pipeline / Deploy Production (pull_request) Has been cancelled
CI/CD Pipeline / Production Browser E2E (pull_request) Has been cancelled
CI/CD Pipeline / Canary Release to Production (pull_request) Has been cancelled
CI/CD Pipeline / CI Gate (pull_request) Has been cancelled
PR Automation / Auto Approve on CI Green (pull_request) Has been cancelled
修复项: 1. Code Quality: 修复F401未使用import + 配置tests目录忽略B011(assert-false) 2. Unit Tests(14个失败): - shared.url_security补全ALLOWED_VIDEO_MIME_TYPES re-export - video_processing.__init__导出url_security子模块 - test_classification更新AssetLibraryKind(新增IMAGE) - test_multi_track_subtitle_concat修复POSITION_ALIGNMENT导入路径 3. Frontend Unit Tests: 更新useGenerateVideo测试为实际存在的导出
106 lines
2.2 KiB
TOML
Executable File
106 lines
2.2 KiB
TOML
Executable File
[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",
|
||
"hostexecutor",
|
||
]
|
||
|
||
[tool.ruff.lint]
|
||
# 正式替换 flake8:规则集与原 flake8 完全对齐
|
||
# 后续迭代计划:
|
||
# Phase 2: 加入 B (flake8-bugbear),修完后升级为阻断级
|
||
# Phase 3: 启用 UP(pyupgrade) + SIM(simplify)
|
||
# Phase 4: 启用 RET(return) + ARG(unused-args)
|
||
select = [
|
||
"E", # pycodestyle errors(同 flake8)
|
||
"F", # pyflakes(同 flake8)
|
||
"W", # pycodestyle warnings(同 flake8)
|
||
"B", # flake8-bugbear(P0-5 Step 2 已完成修复)
|
||
]
|
||
# 与原 setup.cfg + .flake8 的 flake8 配置完全对齐
|
||
# 注意:W503 在 ruff≥0.14 中已被移除(行为变默认),故不列入
|
||
ignore = [
|
||
"E203",
|
||
"E501", # line-too-long(black管)
|
||
"E302",
|
||
"E402", # module-import-not-at-top(循环导入多)
|
||
"E722", # bare-except
|
||
"W291",
|
||
"W293",
|
||
"B008", # function-call-in-default-argument(FastAPI 依赖注入模式,大量使用)
|
||
"F403",
|
||
"F405",
|
||
]
|
||
|
||
[tool.ruff.lint.per-file-ignores]
|
||
"__init__.py" = ["F401", "F403", "F405"]
|
||
"tests/*" = ["E402", "F401", "F821", "F841"]
|
||
"packages/ports/*" = ["E301"] # E704 在 ruff≥0.14 已移除
|
||
"apps/api/app/api/routes/auth.py" = ["ALL"]
|
||
"apps/api/app/api/routes/workspaces.py" = ["ALL"]
|
||
"apps/api/app/middleware/auth.py" = ["ALL"]
|
||
"apps/*/migrations/*" = ["ALL"]
|
||
"alembic/*" = ["ALL"]
|
||
|
||
"tests/**" = ["B011"] |