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 17:51:31 +01:00
committed by GitHub
parent 9bb38130cb
commit 8fcaaf6a16
944 changed files with 9490 additions and 10121 deletions

View File

@@ -3,7 +3,7 @@
"""Compare the with and without prefix caching."""
import copy
from typing import Callable, Optional
from collections.abc import Callable
import pytest
import torch
@@ -55,10 +55,10 @@ def make_request(
prompt_token_ids: list[int],
block_size: int,
hash_fn: Callable,
mm_positions: Optional[list[PlaceholderRange]] = None,
mm_hashes: Optional[list[str]] = None,
prompt_logprobs: Optional[int] = None,
cache_salt: Optional[str] = None,
mm_positions: list[PlaceholderRange] | None = None,
mm_hashes: list[str] | None = None,
prompt_logprobs: int | None = None,
cache_salt: str | None = None,
):
mm_features = []
if mm_positions is not None: