mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
[BE][Ez]: Enable RUF007 Prefer itertools.pairwise over zip slicing (#164856)
Now that our min version is 3.10 we can support this rule. This is more concise, readable, and efficient than the previous zip slicing. Pull Request resolved: https://github.com/pytorch/pytorch/pull/164856 Approved by: https://github.com/williamwen42
This commit is contained in:
committed by
PyTorch MergeBot
parent
6861a27062
commit
d1a62c8036
@ -242,6 +242,7 @@ select = [
|
||||
"Q003", # avoidable escaped quote
|
||||
"Q004", # unnecessary escaped quote
|
||||
"RSE",
|
||||
"RUF007", # pairwise over zip
|
||||
"RUF008", # mutable dataclass default
|
||||
"RUF013", # ban implicit optional
|
||||
"RUF015", # access first ele in constant time
|
||||
|
Reference in New Issue
Block a user