fix(github_copilot): use modern generic annotations

Replace legacy typing generics in the GitHub Copilot Anthropic Messages transformation so the strict Ruff budget gate stays within its ceiling.
This commit is contained in:
ririnto 2026-06-20 21:14:31 +09:00
parent 354d14ad6c
commit 98d44e4437

View file

@ -1,4 +1,4 @@
from typing import Any, List, Optional, Tuple
from typing import Any, Optional
from litellm.exceptions import AuthenticationError
from litellm.llms.anthropic.experimental_pass_through.messages.transformation import (
@ -29,12 +29,12 @@ class GithubCopilotAnthropicMessagesConfig(AnthropicMessagesConfig):
self,
headers: dict,
model: str,
messages: List[Any],
messages: list[Any],
optional_params: dict,
litellm_params: dict,
api_key: Optional[str] = None,
api_base: Optional[str] = None,
) -> Tuple[dict, Optional[str]]:
) -> tuple[dict, Optional[str]]:
"""
Validate environment for GitHub Copilot and add Copilot-specific headers.