mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-03 02:22:24 +00:00
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:
parent
2157d04f8e
commit
b346dd414b
1 changed files with 2 additions and 2 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue