PEP585 update - torch/utils (#145201)

See #145101 for details.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/145201
Approved by: https://github.com/bobrenjc93
This commit is contained in:
Aaron Orenstein
2025-01-20 16:17:30 -08:00
committed by PyTorch MergeBot
parent 693d8c7e94
commit 2f9d378f7b
70 changed files with 491 additions and 550 deletions

View File

@ -3,7 +3,7 @@
import os
import time
from typing import List, Optional, TYPE_CHECKING, Union
from typing import Optional, TYPE_CHECKING, Union
import torch
@ -723,7 +723,7 @@ class SummaryWriter:
def add_figure(
self,
tag: str,
figure: Union["Figure", List["Figure"]],
figure: Union["Figure", list["Figure"]],
global_step: Optional[int] = None,
close: bool = True,
walltime: Optional[float] = None,