From ea99bd058586078eea62bf8411057da0a6b27dd2 Mon Sep 17 00:00:00 2001 From: Oliver Jensen Date: Wed, 9 Sep 2026 15:13:26 +0200 Subject: [PATCH] fix(lint): clear the one-over LIT002 and inline-object budget hits --- litellm/proxy/auth/login_utils.py | 11 ++++++----- .../src/app/(dashboard)/layout.test.tsx | 5 +++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/litellm/proxy/auth/login_utils.py b/litellm/proxy/auth/login_utils.py index 2bf08414e98..16b4ef7380c 100644 --- a/litellm/proxy/auth/login_utils.py +++ b/litellm/proxy/auth/login_utils.py @@ -84,11 +84,12 @@ async def screen_login_password_for_breach( return False breached: Final = await is_password_breached(password, general_settings, client) checked_at: Final = datetime.now(timezone.utc) - update_data: Final[prisma_types.LiteLLM_UserTableUpdateInput] = ( - {"last_breach_check_at": checked_at, "password_reset_required": True} - if breached - else {"last_breach_check_at": checked_at} - ) + breached_update: Final[prisma_types.LiteLLM_UserTableUpdateInput] = { + "last_breach_check_at": checked_at, + "password_reset_required": True, + } + recheck_update: Final[prisma_types.LiteLLM_UserTableUpdateInput] = {"last_breach_check_at": checked_at} + update_data: Final = breached_update if breached else recheck_update find_user: Final[prisma_types.LiteLLM_UserTableWhereInput] = {"user_id": user_id} try: await UserRepository(prisma_client).table.update(where=find_user, data=update_data) diff --git a/ui/litellm-dashboard/src/app/(dashboard)/layout.test.tsx b/ui/litellm-dashboard/src/app/(dashboard)/layout.test.tsx index c930652cca0..ae6575e2349 100644 --- a/ui/litellm-dashboard/src/app/(dashboard)/layout.test.tsx +++ b/ui/litellm-dashboard/src/app/(dashboard)/layout.test.tsx @@ -131,12 +131,13 @@ describe("(dashboard) Layout", () => { }); it("routes a session flagged password_reset_required to the change-password page", async () => { - document.cookie = `token=${sessionCookie({ + const flaggedClaims = { user_id: "flagged-user", key: "sk-session", login_method: "username_password", password_reset_required: true, - })}; Path=/`; + }; + document.cookie = `token=${sessionCookie(flaggedClaims)}; Path=/`; render(