Skip to content

Commit 17a56ba

Browse files
committed
Nicer matrixy_names definition
1 parent 971cd95 commit 17a56ba

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

array_api_tests/test_signatures.py

+5-6
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ def squeeze(x, /, axis):
1919
2020
"""
2121
from inspect import Parameter, Signature, signature
22-
from itertools import chain
2322
from types import FunctionType
2423
from typing import Any, Callable, Dict, List, Literal, Sequence, get_args
2524

@@ -112,11 +111,11 @@ def make_pretty_func(func_name: str, args: Sequence[Any], kwargs: Dict[str, Any]
112111
return f_sig
113112

114113

115-
matrixy_funcs: List[str] = [
116-
f.__name__
117-
for f in chain(category_to_funcs["linear_algebra"], extension_to_funcs["linalg"])
114+
matrixy_funcs: List[FunctionType] = [
115+
*category_to_funcs["linear_algebra"], *extension_to_funcs["linalg"]
118116
]
119-
matrixy_funcs += ["__matmul__", "triu", "tril"]
117+
matrixy_names: List[str] = [f.__name__ for f in matrixy_funcs]
118+
matrixy_names += ["__matmul__", "triu", "tril"]
120119

121120

122121
@given(data=st.data())
@@ -137,7 +136,7 @@ def _test_uninspectable_func(
137136
"bitwise_left_shift",
138137
"bitwise_right_shift",
139138
"sort",
140-
*matrixy_funcs,
139+
*matrixy_names,
141140
]:
142141
pytest.skip(skip_msg)
143142

0 commit comments

Comments
 (0)