From 2eab418cf94739835a058fb70614602d6692788d Mon Sep 17 00:00:00 2001 From: Sangsiva <101570025+Sangsiva@users.noreply.github.com> Date: Mon, 21 Sep 2026 15:42:35 +0800 Subject: [PATCH] fix(anthropic): annotate return type of identity-strip staticmethod Restores the ANN205 strict-rule budget: the new helper is a @staticmethod and must carry a return annotation like its billing-header sibling gate. --- .../experimental_pass_through/messages/transformation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litellm/llms/anthropic/experimental_pass_through/messages/transformation.py b/litellm/llms/anthropic/experimental_pass_through/messages/transformation.py index 641f7410126..f754c558c87 100644 --- a/litellm/llms/anthropic/experimental_pass_through/messages/transformation.py +++ b/litellm/llms/anthropic/experimental_pass_through/messages/transformation.py @@ -137,7 +137,7 @@ class AnthropicMessagesConfig(BaseAnthropicMessagesConfig): return False @staticmethod - def _strip_claude_code_identity_from_system(system_param): + def _strip_claude_code_identity_from_system(system_param) -> str | list | None: """ Strip Claude Code's self-identification sentence from system parameter.