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
+3 -3
View File
@@ -2,7 +2,7 @@
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
import contextlib
from typing import TYPE_CHECKING, Optional, Union, cast
from typing import TYPE_CHECKING, cast
import torch
from tpu_info import device
@@ -57,7 +57,7 @@ class TpuPlatform(Platform):
selected_backend: "_Backend",
head_size: int,
dtype: torch.dtype,
kv_cache_dtype: Optional[str],
kv_cache_dtype: str | None,
block_size: int,
use_v1: bool,
use_mla: bool,
@@ -211,7 +211,7 @@ class TpuPlatform(Platform):
def validate_request(
cls,
prompt: PromptType,
params: Union[SamplingParams, PoolingParams],
params: SamplingParams | PoolingParams,
processed_inputs: ProcessorInputs,
) -> None:
"""Raises if this request is unsupported on this platform"""