Skip to content

Commit 995748c

Browse files
committed
fix: CI failures — ruff import sort, raise-from, login.tsx version ref
- Ruff: fix import sorting for RequestValidationError in main.py - Ruff B904: add `from exc` to TimeoutError raises in evaluate.py - login.tsx: remove health.version (no longer in public HealthResponse)
1 parent 2868fb4 commit 995748c

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

dashboard/src/pages/login.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -158,11 +158,9 @@ export function LoginPage() {
158158
</CardFooter>
159159
</form>
160160

161-
{health && (
162-
<p className="pb-4 text-center text-xs text-muted-foreground">
163-
v{health.version}
164-
</p>
165-
)}
161+
<p className="pb-4 text-center text-xs text-muted-foreground">
162+
Edictum Console
163+
</p>
166164
</Card>
167165
</div>
168166
)

src/edictum_server/main.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515

1616
import sqlalchemy as sa
1717
from fastapi import FastAPI, Request
18-
from fastapi.exceptions import HTTPException as StarletteHTTPException, RequestValidationError
18+
from fastapi.exceptions import HTTPException as StarletteHTTPException
19+
from fastapi.exceptions import RequestValidationError
1920
from fastapi.middleware.cors import CORSMiddleware
2021
from fastapi.responses import FileResponse, HTMLResponse, JSONResponse, RedirectResponse
2122
from fastapi.staticfiles import StaticFiles

src/edictum_server/routes/evaluate.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ async def evaluate(
3737
"""
3838
try:
3939
await asyncio.wait_for(_EVALUATE_SEMAPHORE.acquire(), timeout=1.0)
40-
except TimeoutError:
40+
except TimeoutError as exc:
4141
raise HTTPException(
4242
status_code=429,
4343
detail="Too many concurrent evaluations. Try again shortly.",
44-
)
44+
) from exc
4545
try:
4646
return await asyncio.wait_for(
4747
asyncio.to_thread(
@@ -54,11 +54,11 @@ async def evaluate(
5454
),
5555
timeout=_EVALUATE_TIMEOUT_SECONDS,
5656
)
57-
except TimeoutError:
57+
except TimeoutError as exc:
5858
raise HTTPException(
5959
status_code=422,
6060
detail="Evaluation timed out — contract bundle may be too complex.",
61-
)
61+
) from exc
6262
except ValueError as exc:
6363
raise HTTPException(status_code=422, detail=str(exc)) from exc
6464
finally:

0 commit comments

Comments
 (0)