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

@@ -5,7 +5,6 @@ import multiprocessing
import socket
import threading
import time
from typing import Optional
from unittest.mock import patch
import pytest
@@ -105,7 +104,7 @@ def test_wait_for_completion_or_failure(api_server_args):
assert len(manager.processes) == 3
# Create a result capture for the thread
result: dict[str, Optional[Exception]] = {"exception": None}
result: dict[str, Exception | None] = {"exception": None}
def run_with_exception_capture():
try:
@@ -218,7 +217,7 @@ def test_external_process_monitoring(api_server_args):
assert len(manager.processes) == 3
# Create a result capture for the thread
result: dict[str, Optional[Exception]] = {"exception": None}
result: dict[str, Exception | None] = {"exception": None}
def run_with_exception_capture():
try: