Skip to content

Commit c0f83de

Browse files
fix lint
1 parent 08ecaea commit c0f83de

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

Lib/test/test_weakref.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -545,38 +545,38 @@ def _assert_no_proxy_refcount_leak(self, make_class, do_op, op_name):
545545
dead = weakref.proxy(o)
546546
del o
547547
gc.collect()
548-
548+
549549
# Create live proxy
550550
obj = make_class()
551551
ref = weakref.ref(obj)
552552
proxy = weakref.proxy(obj)
553-
553+
554554
# run operation
555555
try:
556556
do_op(proxy, dead)
557557
except ReferenceError:
558558
pass
559559
del proxy, obj, dead
560560
gc.collect()
561-
561+
562562
# verify
563563
self.assertIsNone(ref(), f"Leaked object in '{op_name}' operation")
564564

565565
def test_proxy_unref_unary_refcount(self):
566566
class C:
567567
def __neg__(self): return 0
568568
self._assert_no_proxy_refcount_leak(C,lambda p, d: operator.neg(d), "Unary")
569-
569+
570570
def test_proxy_unref_binary_refcount(self):
571571
class C:
572572
def __add__(self, o): return NotImplemented
573573
self._assert_no_proxy_refcount_leak(C, operator.add, "Binary")
574-
574+
575575
def test_proxy_unref_ternary_refcount(self):
576576
class C:
577577
def __pow__(self, o, m=None): return NotImplemented
578578
self._assert_no_proxy_refcount_leak(C, lambda p, d: pow(p, d, None), "Ternary")
579-
579+
580580
def test_proxy_unref_richcompare_refcount(self):
581581
class C:
582582
def __eq__(self, o): return NotImplemented

Misc/NEWS.d/next/Core_and_Builtins/2026-04-10-16-19-23.gh-issue-148263.trqp3-.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ reference count was already incremented by the unwrap step but never released,
66
a proper inline function _proxy_unwrap() that tracks whether each
77
argument was incref'd, and introduces cleanup paths (goto clean_up)
88
that correctly decref any already-acquired references before
9-
returning NULL on failure. Also added reference cleanup in unary and compare
9+
returning NULL on failure. Also added reference cleanup in unary and compare
1010
operations.

0 commit comments

Comments
 (0)