From 4016316c20dfd5193584ce31bd4f2cfed5b3232c Mon Sep 17 00:00:00 2001 From: SIDDARTHA REDDY <75976672+SIDDARTHAREDDY8@users.noreply.github.com> Date: Sat, 17 Oct 2026 13:28:13 -0400 Subject: [PATCH] fix(proxy): declare is_database_configured locals Final for the type-discipline gate Signed-off-by: SIDDARTHA REDDY <75976672+SIDDARTHAREDDY8@users.noreply.github.com> --- litellm/proxy/db/exception_handler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/litellm/proxy/db/exception_handler.py b/litellm/proxy/db/exception_handler.py index 3f5d4558716..0a2bf2aa279 100644 --- a/litellm/proxy/db/exception_handler.py +++ b/litellm/proxy/db/exception_handler.py @@ -112,8 +112,8 @@ class PrismaDBExceptionHandler: # ``proxy_server`` here could fail or recurse while it is still # being imported, and a proxy server that has not been imported # yet has not configured a database through it either. - proxy_server_module = sys.modules.get("litellm.proxy.proxy_server") - general_settings = getattr(proxy_server_module, "general_settings", None) + proxy_server_module: Final = sys.modules.get("litellm.proxy.proxy_server") + general_settings: Final = getattr(proxy_server_module, "general_settings", None) return isinstance(general_settings, dict) and bool(general_settings.get("database_url")) @staticmethod