Skip to content

Commit ac9b3b0

Browse files
committed
Fix array_attributes
Previously it was including every method inherited from object, like __dict__. Now it only includes the properties actually defined on the array stub class.
1 parent ab69980 commit ac9b3b0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

array_api_tests/stubs.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@
3636
if n != "__init__" # probably exists for Sphinx
3737
]
3838
array_attributes = [
39-
n for n, f in inspect.getmembers(array, predicate=lambda x: not inspect.isfunction(x))
40-
if n != "__init__" # probably exists for Sphinx
39+
n for n, f in inspect.getmembers(array, predicate=lambda x: isinstance(x, property))
4140
]
4241

4342
category_to_funcs: Dict[str, List[FunctionType]] = {}

0 commit comments

Comments
 (0)