[9/N] Apply ruff UP035 rule (#165515)

This is follow-up of #165214 to continue applying ruff UP035 rule to the code base.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/165515
Approved by: https://github.com/Lucaskabela
This commit is contained in:
Yuanyuan Chen
2025-10-17 00:09:49 +00:00
committed by PyTorch MergeBot
parent 470e2f61c3
commit b2953f5643
27 changed files with 72 additions and 33 deletions

View File

@ -3,10 +3,11 @@ import csv
import itertools
import random
from collections import defaultdict
from collections.abc import Callable
from contextlib import nullcontext
from dataclasses import asdict, dataclass
from functools import partial
from typing import Callable, Optional, Union
from typing import Optional, Union
import numpy as np
from tabulate import tabulate