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,10 +4,9 @@
import asyncio
import tempfile
from argparse import Namespace
from collections.abc import Awaitable
from collections.abc import Awaitable, Callable
from http import HTTPStatus
from io import StringIO
from typing import Callable, Optional
import aiohttp
import torch
@@ -124,7 +123,7 @@ _BAR_FORMAT = "{desc}: {percentage:3.0f}% Completed | {n_fmt}/{total_fmt} [{elap
class BatchProgressTracker:
def __init__(self):
self._total = 0
self._pbar: Optional[tqdm] = None
self._pbar: tqdm | None = None
def submitted(self):
self._total += 1