From 515eb0298fcb20c0a1f1bf70e568e32a85dc21e2 Mon Sep 17 00:00:00 2001 From: Christian-Sidak <61099993+Christian-Sidak@users.noreply.github.com> Date: Sun, 25 Oct 2026 20:04:03 -0700 Subject: [PATCH] fix(utils): move cast-ok suppression to cast() line LIT006 is triggered on the cast( line, but the # cast-ok: comment was on the closing paren line, which caused LIT013 (unused suppression). Moving the comment to the cast( line resolves both violations. Co-Authored-By: Claude Sonnet 4.6 --- litellm/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/litellm/utils.py b/litellm/utils.py index ca0cca79f6d..c9413c3de52 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -8449,9 +8449,9 @@ def validate_and_fix_openai_messages( ) cleaned_message = cleanup_none_field_in_message(message=convert_msg_to_dict) new_messages.append( - cast( + cast( # cast-ok: cleanup_none_field_in_message return satisfies AllMessageValues AllMessageValues, cleaned_message - ) # cast-ok: cleanup_none_field_in_message return satisfies AllMessageValues + ) ) return validate_chat_completion_user_messages(messages=new_messages)