From 5f3a86aee5d7be88c1ef90b211297cc1fd7280f4 Mon Sep 17 00:00:00 2001 From: kerry Date: Fri, 18 Sep 2026 13:27:14 +0000 Subject: [PATCH] test(e2e): use TypeAlias over 3.12 type statements in e2e models Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- tests/e2e/models.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/e2e/models.py b/tests/e2e/models.py index b0ff6fdcd86..b99d2304289 100644 --- a/tests/e2e/models.py +++ b/tests/e2e/models.py @@ -8,7 +8,7 @@ from __future__ import annotations from collections.abc import Sequence from datetime import datetime -from typing import Final, Literal +from typing import Final, Literal, TypeAlias from e2e_http import PartialBody from pydantic import ( @@ -203,7 +203,7 @@ class FileObject(BaseModel): class TextContentPart(BaseModel): type: str = "text" text: str - cache_control: "CacheControl | None" = None + cache_control: CacheControl | None = None class ImageContentPart(BaseModel): @@ -303,7 +303,7 @@ class ChatToolResultTurn(BaseModel): content: str -type ChatTurn = ChatMessage | ChatAssistantTurn | ChatToolResultTurn +ChatTurn: TypeAlias = ChatMessage | ChatAssistantTurn | ChatToolResultTurn class HostedWebSearchTool(BaseModel): @@ -531,7 +531,7 @@ class AnthropicCustomTool(BaseModel): input_schema: ToolInputSchema -type AnthropicTool = AnthropicToolSearchTool | AnthropicWebSearchTool | AnthropicCustomTool +AnthropicTool: TypeAlias = AnthropicToolSearchTool | AnthropicWebSearchTool | AnthropicCustomTool class AnthropicContentBlock(BaseModel): @@ -569,7 +569,7 @@ class AnthropicToolResultTurn(BaseModel): content: list[AnthropicToolResultBlock] -type AnthropicMessage = ChatMessage | AnthropicAssistantTurn | AnthropicToolResultTurn +AnthropicMessage: TypeAlias = ChatMessage | AnthropicAssistantTurn | AnthropicToolResultTurn class AnthropicToolChoice(BaseModel):