Update Optional[x] -> x | None and Union[x, y] to x | y (#26633)

Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
Harry Mellor
2025-10-12 09:51:31 -07:00
committed by GitHub
parent 9bb38130cb
commit 8fcaaf6a16
944 changed files with 9490 additions and 10121 deletions
@@ -13,8 +13,6 @@ possible on ROCm), the model can be optionally augmented with KV cache
scaling factors.
"""
from typing import Optional
from pydantic import BaseModel, ConfigDict, ValidationInfo, model_validator
@@ -75,7 +73,7 @@ class QuantParamSchema(BaseModel):
# TODO: Generalize and extend with more fields
# (e.g. weights/activations params) once functionality is enabled
model_config = ConfigDict(protected_namespaces=())
model_type: Optional[str]
model_type: str | None
kv_cache: KVCacheQuantSchema
@model_validator(mode="after")