Skip to content

Commit d6a53f9

Browse files
committed
Overhaul test_all
1 parent 5e14b53 commit d6a53f9

File tree

16 files changed

+262
-95
lines changed

16 files changed

+262
-95
lines changed

array_api_compat/common/_aliases.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -720,8 +720,6 @@ def iinfo(type_: DType | Array, /, xp: Namespace) -> Any:
720720
"finfo",
721721
"iinfo",
722722
]
723-
_all_ignore = ["inspect", "array_namespace", "NamedTuple"]
724-
725723

726724
def __dir__() -> list[str]:
727725
return __all__

array_api_compat/common/_helpers.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1042,7 +1042,5 @@ def is_lazy_array(x: object) -> bool:
10421042
"to_device",
10431043
]
10441044

1045-
_all_ignore = ["sys", "math", "inspect", "warnings"]
1046-
10471045
def __dir__() -> list[str]:
10481046
return __all__

array_api_compat/common/_linalg.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,8 +225,6 @@ def trace(
225225
'matrix_transpose', 'svdvals', 'vecdot', 'vector_norm', 'diagonal',
226226
'trace']
227227

228-
_all_ignore = ['math', 'normalize_axis_tuple', 'get_xp', 'np', 'isdtype']
229-
230228

231229
def __dir__() -> list[str]:
232230
return __all__

array_api_compat/cupy/_aliases.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,5 +160,3 @@ def count_nonzero(
160160
'atan2', 'atanh', 'bitwise_left_shift',
161161
'bitwise_invert', 'bitwise_right_shift',
162162
'bool', 'concat', 'count_nonzero', 'pow', 'sign']
163-
164-
_all_ignore = ['cp', 'get_xp']

array_api_compat/cupy/_typing.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from __future__ import annotations
22

33
__all__ = ["Array", "DType", "Device"]
4-
_all_ignore = ["cp"]
54

65
from typing import TYPE_CHECKING
76

array_api_compat/dask/array/_aliases.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,8 +369,6 @@ def count_nonzero(
369369
"bitwise_left_shift", "bitwise_right_shift", "bitwise_invert",
370370
] # fmt: skip
371371
__all__ += _aliases.__all__
372-
_all_ignore = ["array_namespace", "get_xp", "da", "np"]
373-
374372

375373
def __dir__() -> list[str]:
376374
return __all__

array_api_compat/dask/array/fft.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,6 @@
1818
rfftfreq = get_xp(da)(_fft.rfftfreq)
1919

2020
__all__ = fft_all + ["fftfreq", "rfftfreq"]
21-
_all_ignore = ["da", "fft_all", "get_xp", "warnings"]
21+
22+
def __dir__() -> list[str]:
23+
return __all__

array_api_compat/dask/array/linalg.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,5 @@ def svdvals(x: _Array) -> _Array:
6969
"cholesky", "matrix_rank", "matrix_norm", "svdvals",
7070
"vector_norm", "diagonal"]
7171

72-
_all_ignore = ['get_xp', 'da', 'linalg_all', 'warnings']
72+
def __dir__() -> list[str]:
73+
return __all__

array_api_compat/numpy/_aliases.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def count_nonzero(
157157
else:
158158
unstack = get_xp(np)(_aliases.unstack)
159159

160-
__all__ = [
160+
__all__ = _aliases.__all__ + [
161161
"__array_namespace_info__",
162162
"asarray",
163163
"astype",
@@ -176,8 +176,6 @@ def count_nonzero(
176176
"count_nonzero",
177177
"pow",
178178
]
179-
__all__ += _aliases.__all__
180-
_all_ignore = ["np", "get_xp"]
181179

182180

183181
def __dir__() -> list[str]:

array_api_compat/numpy/_typing.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
Array: TypeAlias = np.ndarray
2424

2525
__all__ = ["Array", "DType", "Device"]
26-
_all_ignore = ["np"]
2726

2827

2928
def __dir__() -> list[str]:

0 commit comments

Comments
 (0)