PEP585: More UP006 fixes (#146392)

This should be the final PR before we can enable RUFF UP006.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/146392
Approved by: https://github.com/justinchuby, https://github.com/albanD, https://github.com/Skylion007
This commit is contained in:
Aaron Orenstein
2025-02-19 14:37:18 -08:00
committed by PyTorch MergeBot
parent 76ad19a549
commit db4ce78d46
81 changed files with 283 additions and 329 deletions

View File

@ -1,7 +1,7 @@
# mypy: allow-untyped-defs
# The Tensor classes are added to this module by python_tensor.cpp
# A workaround to support both TorchScript and MyPy:
from typing import Any, List, Optional, Tuple, TYPE_CHECKING, Union
from typing import Any, Optional, TYPE_CHECKING, Union
import torch
from torch import Tensor