From b346dd414bf70e1b26864edf7d752770729777a7 Mon Sep 17 00:00:00 2001 From: siyoon Date: Sun, 30 Aug 2026 14:52:35 +0900 Subject: [PATCH] fix(scripts): use PEP 604 union syntax for Optional[str] Ruff UP045 flags Optional[str] as legacy typing; the repo lint baseline expects the modern str | None form for new/changed annotations. --- .github/scripts/auto_update_price_and_context_window_file.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/scripts/auto_update_price_and_context_window_file.py b/.github/scripts/auto_update_price_and_context_window_file.py index 523ec148fc6..596f9a42760 100644 --- a/.github/scripts/auto_update_price_and_context_window_file.py +++ b/.github/scripts/auto_update_price_and_context_window_file.py @@ -1,7 +1,7 @@ import asyncio import aiohttp import json -from typing import Any, Optional +from typing import Any # Asynchronously fetch data from a given URL async def fetch_data(url): @@ -58,7 +58,7 @@ EFFORT_FLAG_MAP = { } -def _find_base_model_entry(base_model: str, local_data: dict) -> Optional[str]: +def _find_base_model_entry(base_model: str, local_data: dict) -> str | None: if not base_model: return None bm_tail = base_model.split("/")[-1].lower()