mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 05:34:18 +08:00
Enable all PIE rules on ruff (#165814)
This PR enables all PIE rules on ruff, there are already some enabled rules from this family, the new added rules are ``` PIE796 Enum contains duplicate value: {value} PIE808 Unnecessary start argument in range ``` Pull Request resolved: https://github.com/pytorch/pytorch/pull/165814 Approved by: https://github.com/ezyang
This commit is contained in:
committed by
PyTorch MergeBot
parent
e595136187
commit
c79dfdc655
@ -8424,7 +8424,7 @@ tensor([[[1.+1.j, 1.+1.j, 1.+1.j, ..., 1.+1.j, 1.+1.j, 1.+1.j],
|
||||
def test_Size_iter(self):
|
||||
for sizes in [iter([1, 2, 3, 4, 5]), range(1, 6)]:
|
||||
x = torch.Size(sizes)
|
||||
for i in range(0, 5):
|
||||
for i in range(5):
|
||||
self.assertEqual(x[i], i + 1)
|
||||
|
||||
def test_t_not_2d_error(self):
|
||||
|
Reference in New Issue
Block a user