Skip to content

Commit 4ebcbe7

Browse files
committed
Merge remote-tracking branch 'origin/lazy-class-methods' into lazy-class-methods
2 parents fd984dc + 5f72865 commit 4ebcbe7

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/array_api_extra/testing.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,8 @@ def test_myfunc(xp):
227227
# Replace the method with a clone before adding tags
228228
# to avoid adding unwanted tags to a parent method when
229229
# the method was inherited from a parent class.
230+
# Note: can't just accept an unbound method `cls.method_name` because in
231+
# case of inheritance it would be impossible to attribute it to the child class.
230232
cls, method_name = func
231233
method = getattr(cls, method_name)
232234
setattr(cls, method_name, _clone_function(method))

0 commit comments

Comments
 (0)