From 377aa077215b13e09ff61c1ca9a0869cc356aac0 Mon Sep 17 00:00:00 2001 From: Tufail Akram Date: Fri, 2 Oct 2026 15:26:56 +0530 Subject: [PATCH] fix(proxy): satisfy LIT006 and LIT010 in audit task registry --- litellm/proxy/management_helpers/audit_logs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/litellm/proxy/management_helpers/audit_logs.py b/litellm/proxy/management_helpers/audit_logs.py index 30202bd238a..dd2f03f9b52 100644 --- a/litellm/proxy/management_helpers/audit_logs.py +++ b/litellm/proxy/management_helpers/audit_logs.py @@ -124,7 +124,7 @@ def _build_audit_log_payload( ) -_T = TypeVar("_T") +_T: Final = TypeVar("_T") class AuditTaskRegistry: @@ -134,7 +134,7 @@ class AuditTaskRegistry: self._pending_tasks: Final[set[asyncio.Task[object]]] = set() # mutable-ok: background task tracking def track(self, task: asyncio.Task[_T]) -> asyncio.Task[_T]: - task_object: Final[asyncio.Task[object]] = cast(asyncio.Task[object], task) # noqa: LIT006 # Type cast required for tracking generic asyncio task state + task_object: Final[asyncio.Task[object]] = cast(asyncio.Task[object], task) # cast-ok: task covariance if task_object.done() or task_object in self._pending_tasks: return task self._pending_tasks.add(task_object)