mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 05:34:18 +08:00
Enable ruff rule E721 (#165162)
`E721` checks for object type comparisons using == and other comparison operators. This is useful because it is recommended to use `is` for type comparisons. Pull Request resolved: https://github.com/pytorch/pytorch/pull/165162 Approved by: https://github.com/Skylion007
This commit is contained in:
committed by
PyTorch MergeBot
parent
a33f85e791
commit
8de85896e0
@ -596,7 +596,7 @@ class TestNumPyInterop(TestCase):
|
||||
if (
|
||||
dtype == torch.complex64
|
||||
and torch.is_tensor(t)
|
||||
and type(a) == np.complex64
|
||||
and type(a) is np.complex64
|
||||
):
|
||||
# TODO: Imaginary part is dropped in this case. Need fix.
|
||||
# https://github.com/pytorch/pytorch/issues/43579
|
||||
|
Reference in New Issue
Block a user