mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-25 16:14:55 +08:00
[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:
committed by
PyTorch MergeBot
parent
02c2b750c5
commit
88ab3e4322
@ -82,10 +82,8 @@ class TestQuantizationDocs(QuantizationTestCase):
|
||||
|
||||
# want to make sure we are actually getting some code,
|
||||
assert last_line_num - line_num_start > 3 or short_snippet, (
|
||||
"The code in {} identified by {} seems suspiciously short:"
|
||||
"\n\n###code-start####\n{}###code-end####".format(
|
||||
path_to_file, unique_identifier, code
|
||||
)
|
||||
f"The code in {path_to_file} identified by {unique_identifier} seems suspiciously short:"
|
||||
f"\n\n###code-start####\n{code}###code-end####"
|
||||
)
|
||||
return code
|
||||
|
||||
|
||||
Reference in New Issue
Block a user