Revert "Enable ruff rule E721 (#165162)"

This reverts commit 9e7c19f72b6d0690915c307409c0c0a76b5a3bf0.

Reverted https://github.com/pytorch/pytorch/pull/165162 on behalf of https://github.com/pytorch-auto-revert due to Reverted automatically by pytorch's autorevert, to avoid this behaviour add the tag autorevert: disable ([comment](https://github.com/pytorch/pytorch/pull/165162#issuecomment-3393328271))
This commit is contained in:
PyTorch MergeBot
2025-10-11 13:25:40 +00:00
parent 512dd79ff0
commit 816fb7f48d
78 changed files with 164 additions and 166 deletions

View File

@ -3327,7 +3327,7 @@ class TestReductions(TestCase):
"""
def _test_histogramdd_numpy(self, t, bins, bin_range, weights, density):
def to_np(t):
if type(t) is list:
if type(t) == list:
return list(map(to_np, t))
if not torch.is_tensor(t):
return t