From 8f24094a108ccf2f10f27f778098076ddf265f87 Mon Sep 17 00:00:00 2001 From: sun04222 <3242054475@qq.com> Date: Sat, 24 Oct 2026 10:24:40 +0800 Subject: [PATCH] fix(generic_api): keep the mutable-ok suppression on the annotated line ruff format wraps the long annotation; the suppression comment belongs on the first line of the statement, where the LIT001 violation is emitted. --- litellm/integrations/generic_api/generic_api_callback.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/litellm/integrations/generic_api/generic_api_callback.py b/litellm/integrations/generic_api/generic_api_callback.py index cbdc3ecd205..17a6ae6bc79 100644 --- a/litellm/integrations/generic_api/generic_api_callback.py +++ b/litellm/integrations/generic_api/generic_api_callback.py @@ -376,9 +376,9 @@ class GenericAPILogger(CustomBatchLogger): batch: Final = tuple(self.log_queue) if not batch: return - failed_events: Final[ + failed_events: Final[ # mutable-ok: filled while the send runs and drained into the queue in finally list[Mapping[str, object] | StandardLoggingPayload] - ] = [] # mutable-ok: filled while the send runs and drained into the queue in finally + ] = [] try: verbose_logger.debug( "Generic API Logger - about to flush %s events in '%s' format", len(batch), self.log_format