Skip to content

Commit ea347fd

Browse files
committed
linting fixes
Signed-off-by: Madhav Kandukuri <[email protected]>
1 parent 798cee6 commit ea347fd

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

mcpgateway/main.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -608,8 +608,9 @@ def get_protocol_from_request(request: Request) -> str:
608608
1) X-Forwarded-Proto (if set by a proxy)
609609
2) request.url.scheme (e.g. when Gunicorn/Uvicorn is terminating TLS)
610610
611-
Args:
611+
Args:
612612
request (Request): The FastAPI request object.
613+
613614
Returns:
614615
str: The protocol used for the request, either "http" or "https".
615616
"""
@@ -626,11 +627,12 @@ def update_url_protocol(request: Request) -> str:
626627
627628
Args:
628629
request (Request): The FastAPI request object.
630+
629631
Returns:
630632
str: The base URL with the correct protocol.
631633
"""
632634
parsed = urlparse(str(request.base_url))
633-
proto = get_protocol_from_request(request)
635+
proto = get_protocol_from_request(request)
634636
new_parsed = parsed._replace(scheme=proto)
635637
# urlunparse keeps netloc and path intact
636638
return urlunparse(new_parsed).rstrip("/")
@@ -2282,7 +2284,6 @@ async def readiness_check(db: Session = Depends(get_db)):
22822284
try:
22832285
# Run the blocking DB check in a thread to avoid blocking the event loop
22842286
await asyncio.to_thread(db.execute, text("SELECT 1"))
2285-
return JSONResponse(content={"status": "ready"}, status_code=200)
22862287
except Exception as e:
22872288
error_message = f"Readiness check failed: {str(e)}"
22882289
logger.error(error_message)

0 commit comments

Comments
 (0)