fix(proxy): declare is_database_configured locals Final for the type-discipline gate

Signed-off-by: SIDDARTHA REDDY <75976672+SIDDARTHAREDDY8@users.noreply.github.com>
This commit is contained in:
SIDDARTHA REDDY 2026-10-17 13:28:13 -04:00
parent fef9c7e5bf
commit 4016316c20

View file

@ -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