Skip to content

Commit 890c497

Browse files
committed
Clean up
1 parent bca606d commit 890c497

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

array_api_compat/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
this implementation for the default when working with NumPy arrays.
1818
1919
"""
20-
__version__ = "1.4.1"
20+
__version__ = '1.4.1'
2121

2222
from .common import (
2323
array_namespace,

array_api_compat/_internal.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def wrapped_f(*args, **kwargs):
4444
return inner
4545

4646

47-
def get_all_public_members(module, filter_=None):
47+
def _get_all_public_members(module, filter_=None):
4848
"""Get all public members of a module."""
4949
try:
5050
return getattr(module, '__all__')
@@ -54,4 +54,4 @@ def get_all_public_members(module, filter_=None):
5454
if filter_ is None:
5555
filter_ = lambda name: name.startswith('_') # noqa: E731
5656

57-
return map(dir(module), filter_)
57+
return map(filter_, dir(module))

array_api_compat/common/_helpers.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,11 @@
77
"""
88
from __future__ import annotations
99

10-
from typing import Optional, Union, Any
11-
from ._typing import Array, Device
10+
from typing import TYPE_CHECKING
11+
12+
if TYPE_CHECKING:
13+
from typing import Optional, Union, Any
14+
from ._typing import Array, Device
1215

1316
import sys
1417
import math

0 commit comments

Comments
 (0)