[8/N] Apply ruff UP035 rule (#165214)

This is follow-up of #164653 to continue applying `UP035` fixes. The purpose is to finally enable this rule.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/165214
Approved by: https://github.com/ezyang
This commit is contained in:
Yuanyuan Chen
2025-10-15 03:18:57 +00:00
committed by PyTorch MergeBot
parent 36871622f1
commit b11593c31b
35 changed files with 71 additions and 45 deletions

View File

@ -35,7 +35,8 @@ from torch.fx.experimental.rewriter import RewritingTracer
from torch.fx.operator_schemas import get_signature_for_torch_op
from copy import deepcopy
from collections import namedtuple
from typing import Any, Callable, NamedTuple, Optional, Union
from typing import Any, NamedTuple, Optional, Union
from collections.abc import Callable
import torch