From 47b546f69a7454e7049f88ee5d491e5df2b9819f Mon Sep 17 00:00:00 2001 From: jquinter Date: Wed, 4 Feb 2026 23:41:01 -0300 Subject: [PATCH] fix(lint): remove unused Any/cast imports in github_copilot transformation (#20431) The cast(Any, message) pattern was used to suppress typed-dict mutation warnings, but the parameter has no type annotation so it's unnecessary. Direct assignment works and eliminates the F401 unused-import lint error. Co-authored-by: Claude Opus 4.5 --- litellm/llms/github_copilot/chat/transformation.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/litellm/llms/github_copilot/chat/transformation.py b/litellm/llms/github_copilot/chat/transformation.py index 945b7ebf7ff..d613c82402d 100644 --- a/litellm/llms/github_copilot/chat/transformation.py +++ b/litellm/llms/github_copilot/chat/transformation.py @@ -1,4 +1,4 @@ -from typing import Any, List, Optional, Tuple, cast +from typing import List, Optional, Tuple from litellm.exceptions import AuthenticationError from litellm.llms.openai.openai import OpenAIConfig @@ -54,7 +54,7 @@ class GithubCopilotConfig(OpenAIConfig): # GitHub Copilot API now supports system prompts for all models (Claude, GPT, etc.) # No conversion needed - just return messages as-is return messages - + # Default behavior: convert system messages to assistant for compatibility transformed_messages = [] for message in messages: @@ -65,7 +65,7 @@ class GithubCopilotConfig(OpenAIConfig): transformed_messages.append(transformed_message) else: transformed_messages.append(message) - + return transformed_messages def validate_environment(