Skip to content

Commit 0906408

Browse files
committed
refactor: rename type variable in HasArrayNamespace protocol for consistency
1 parent 10dfe43 commit 0906408

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/array_api_typing/_array.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
from typing import Protocol
88
from typing_extensions import TypeVar
99

10-
T_co = TypeVar("T_co", covariant=True, bound=object, default=ModuleType)
10+
NS_co = TypeVar("NS_co", covariant=True, bound=object, default=ModuleType)
1111

1212

13-
class HasArrayNamespace(Protocol[T_co]):
13+
class HasArrayNamespace(Protocol[NS_co]):
1414
"""Protocol for classes that have an `__array_namespace__` method.
1515
1616
Example:
@@ -28,11 +28,11 @@ class HasArrayNamespace(Protocol[T_co]):
2828
2929
"""
3030

31-
def __array_namespace__(self, /, *, api_version: str | None = None) -> T_co: ... # noqa: PLW3201
31+
def __array_namespace__(self, /, *, api_version: str | None = None) -> NS_co: ... # noqa: PLW3201
3232

3333

3434
class Array(
35-
HasArrayNamespace[T_co],
35+
HasArrayNamespace[NS_co],
3636
Protocol,
3737
):
3838
"""Array API specification for array object attributes and methods."""

0 commit comments

Comments
 (0)