[BE]: Update ruff to 0.285 (#107519)

This updates ruff to 0.285 which is faster, better, and have fixes a bunch of false negatives with regards to fstrings.

I also enabled RUF017 which looks for accidental quadratic list summation. Luckily, seems like there are no instances of it in our codebase, so enabling it so that it stays like that. :)

Pull Request resolved: https://github.com/pytorch/pytorch/pull/107519
Approved by: https://github.com/ezyang
This commit is contained in:
Aaron Gokaslan
2023-08-22 23:16:35 +00:00
committed by PyTorch MergeBot
parent e8278d6058
commit 660e8060ad
86 changed files with 319 additions and 403 deletions

View File

@ -168,9 +168,9 @@ class TestBinaryUfuncs(TestCase):
if _numel(l) <= 100 and _numel(r) <= 100:
msg = (
"Failed to produce expected results! Input lhs tensor was"
" {}, rhs tensor was {}, torch result is {}, and reference result is"
" {}."
).format(l, r, actual, expected)
f" {l}, rhs tensor was {r}, torch result is {actual}, and reference result is"
f" {expected}."
)
else:
msg = None