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

@ -554,7 +554,7 @@ def fuzz_scalar(spec, seed: Optional[int] = None) -> Union[float, int, bool, com
def specs_compatible(spec1: Spec, spec2: Spec) -> bool:
"""Check if two specifications are compatible (one can be used where the other is expected)."""
if type(spec1) is not type(spec2):
if type(spec1) != type(spec2):
return False
if isinstance(spec1, ScalarSpec):