From 134b216f4c905fdee36a3b49e64f699aa333fe56 Mon Sep 17 00:00:00 2001 From: Leo Vasanko Date: Tue, 10 Feb 2026 23:52:07 +0000 Subject: [PATCH] Cleanup --- cista/sso.py | 8 +++----- pyproject.toml | 1 + 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/cista/sso.py b/cista/sso.py index 938ffa4..1c6ba3a 100644 --- a/cista/sso.py +++ b/cista/sso.py @@ -15,7 +15,8 @@ import re import httpx import websockets -from sanic import Blueprint +from sanic import Blueprint, json +from sanic import raw as raw_response from sanic.exceptions import Forbidden, SanicException, Unauthorized from sanic.log import logger @@ -220,8 +221,6 @@ async def proxy_auth_request(request): if key.lower() not in resp_hop_by_hop ] - from sanic import raw as raw_response - return raw_response( raw_content, status=response.status_code, @@ -231,10 +230,9 @@ async def proxy_auth_request(request): except httpx.RequestError as e: logger.error(f"Auth proxy request failed: {e}") - from sanic import json return json( - {"detail": "Authentication service unavailable", "error": str(e)}, + {"detail": "Authentication service unavailable"}, status=503, ) diff --git a/pyproject.toml b/pyproject.toml index 4af496a..f78b693 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -114,6 +114,7 @@ filterwarnings = [ ] [tool.ruff.lint] +extend-select = ["E402"] isort.known-first-party = ["cista"] per-file-ignores."tests/*" = ["S", "ANN", "D", "INP", "PLR2004"] per-file-ignores."scripts/*" = ["T20"]