mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +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
e8278d6058
commit
660e8060ad
@ -122,11 +122,11 @@ class SobolEngine:
|
||||
total_n = self.num_generated + n
|
||||
if not (total_n & (total_n - 1) == 0):
|
||||
raise ValueError("The balance properties of Sobol' points require "
|
||||
"n to be a power of 2. {0} points have been "
|
||||
"previously generated, then: n={0}+2**{1}={2}. "
|
||||
f"n to be a power of 2. {self.num_generated} points have been "
|
||||
f"previously generated, then: n={self.num_generated}+2**{m}={total_n}. "
|
||||
"If you still want to do this, please use "
|
||||
"'SobolEngine.draw()' instead."
|
||||
.format(self.num_generated, m, total_n))
|
||||
)
|
||||
return self.draw(n=n, out=out, dtype=dtype)
|
||||
|
||||
def reset(self):
|
||||
|
Reference in New Issue
Block a user