fix: corriger 33 erreurs mypy (CI bloquant) + lien README (BUG-003, BUG-004)
CI / lint (push) Successful in 1m1s
CI / security (push) Successful in 40s
CI / test (push) Successful in 1m17s
CI / build (push) Successful in 38s
CI / e2e (push) Successful in 10m55s
Desktop Build / build-windows (push) Canceled after 0s
Desktop Build / build-linux (push) Canceled after 0s

BUG-003: annotations de types, gardes None sur get_user(), PdfReader: Any et import PROVIDERS manquant (bug latent main.py:4523). Etape mypy du CI rendue bloquante (etait advisory).

BUG-004: lien README.md -> docs/CONTRIBUTING.md corrige (+ DELIVERY_WORKFLOW.md), arbre projet mis a jour, parite README.fr.md.

Verifie: mypy 0 erreur, ruff OK, pytest 728 passed / 5 skipped, frontend OK, liens md OK.
This commit is contained in:
2026-09-11 14:57:55 -04:00
parent ce23ab38f7
commit 240fd8586e
11 changed files with 52 additions and 29 deletions
+5 -5
View File
@@ -735,7 +735,7 @@ def _custom_openapi():
return app.openapi_schema
app.openapi = _custom_openapi
app.openapi = _custom_openapi # type: ignore[method-assign]
# GZip compression — reduces bandwidth by ~70% for text responses
# Custom wrapper: skip compression for SSE streams (/api/events)
@@ -2429,7 +2429,7 @@ def _list_backup_files(vault_name: str, relative_path: str) -> list[dict]:
original_name = Path(relative_path).name
prefix = original_name + "."
backups = []
backups: list[dict[str, Any]] = []
try:
dir_entries = list(backup_dir.iterdir())
@@ -3920,7 +3920,7 @@ async def api_vault_recent_files(
if not dir_path.exists() or not dir_path.is_dir():
raise HTTPException(status_code=404, detail=f"Directory not found: {dir}")
files = []
files: list[dict[str, Any]] = []
dir_prefix = (dir or "").strip("/")
try:
@@ -4022,7 +4022,7 @@ async def api_backups_list(
current_user=Depends(require_auth),
):
"""List all backups across vaults, grouped by file."""
result = []
result: list[dict[str, Any]] = []
try:
for vault_name in index:
if vault and vault_name != vault:
@@ -4357,7 +4357,7 @@ async def api_set_config(body: dict = Body(...), current_user=Depends(require_ad
# AI API Keys — stored in data/api_keys.json, fallback to .env
# ---------------------------------------------------------------------------
from backend.ai import _read_ai_keys, get_ai_key
from backend.ai import PROVIDERS, _read_ai_keys, get_ai_key
AI_KEYS_FILE = Path("data/api_keys.json")