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.
This commit is contained in:
siyoon 2026-08-30 14:52:35 +09:00
parent 2157d04f8e
commit b346dd414b

View file

@ -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()