mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +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
a0948d4d23
commit
fdab48a7c1
@ -147,7 +147,7 @@ def native_layer_norm_backward(
|
||||
inner_dims = input_shape[axis:]
|
||||
outer_dims = input_shape[:axis]
|
||||
inner_dim_indices = list(range(axis, input_ndim))
|
||||
outer_dim_indices = list(range(0, axis))
|
||||
outer_dim_indices = list(range(axis))
|
||||
|
||||
N = 1
|
||||
for i in inner_dims:
|
||||
|
Reference in New Issue
Block a user