From 98d44e44374d3055e84b9e346d1870c7d0b07cc1 Mon Sep 17 00:00:00 2001 From: ririnto Date: Sat, 20 Jun 2026 21:14:31 +0900 Subject: [PATCH] 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. --- litellm/llms/github_copilot/messages/transformation.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/litellm/llms/github_copilot/messages/transformation.py b/litellm/llms/github_copilot/messages/transformation.py index 35ee168ef54..50f61c7f72f 100644 --- a/litellm/llms/github_copilot/messages/transformation.py +++ b/litellm/llms/github_copilot/messages/transformation.py @@ -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.