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
+2 -3
View File
@@ -4,7 +4,6 @@
import contextlib
import enum
import json
from typing import Optional
import torch
@@ -57,7 +56,7 @@ def prepare_object_to_dump(obj) -> str:
def dump_engine_exception(
config: VllmConfig,
scheduler_output: SchedulerOutput,
scheduler_stats: Optional[SchedulerStats],
scheduler_stats: SchedulerStats | None,
):
# NOTE: ensure we can log extra info without risking raises
# unexpected errors during logging
@@ -68,7 +67,7 @@ def dump_engine_exception(
def _dump_engine_exception(
config: VllmConfig,
scheduler_output: SchedulerOutput,
scheduler_stats: Optional[SchedulerStats],
scheduler_stats: SchedulerStats | None,
):
logger.error(
"Dumping input data for V1 LLM engine (v%s) with config: %s, ",