mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Revert "[BE]: Update ruff to 0.285 (#107519)"
This reverts commit 88ab3e43228b7440a33bf534cde493446a31538c. Reverted https://github.com/pytorch/pytorch/pull/107519 on behalf of https://github.com/ZainRizvi due to Sorry, but this PR breaks internal tests. @ezyang, can you please hep them get unblocked? It seems like one of the strings was prob accidentally modified ([comment](https://github.com/pytorch/pytorch/pull/107519#issuecomment-1688833480))
This commit is contained in:
@ -152,10 +152,10 @@ class TestDispatch(TestCase):
|
||||
# NB: this finally test asserts that if a registrations fails,
|
||||
# the dispatcher is left in the same state *that it was before*!
|
||||
check_invariants(
|
||||
f"running ctors {ctor_order[:i]} and then failing to run ctor {op_ix} "
|
||||
"running ctors {} and then failing to run ctor {} "
|
||||
"(did this failure leave the dispatcher in a wedged state? "
|
||||
"it shouldn't!)"
|
||||
)
|
||||
.format(ctor_order[:i], op_ix))
|
||||
break
|
||||
last_ctor = i
|
||||
if expect_raises and len(active_ops) == len(ops):
|
||||
@ -165,7 +165,7 @@ class TestDispatch(TestCase):
|
||||
self.assertTrue(
|
||||
False,
|
||||
"expected exception to be raised, but nothing was raised "
|
||||
f"(after running ctors {ctor_order})")
|
||||
"(after running ctors {})".format(ctor_order))
|
||||
# In the order specified by dtor_order, run deregistrations
|
||||
for i, op_ix in enumerate(dtor_order):
|
||||
# Trigger a destruction
|
||||
|
Reference in New Issue
Block a user