mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-06 02:48:13 +00:00
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 <noreply@anthropic.com>
This commit is contained in:
parent
8e1201ca3d
commit
47b546f69a
1 changed files with 3 additions and 3 deletions
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue