Skip to content

Commit 382373c

Browse files
committed
refactor: rename type variable in HasArrayNamespace protocol for consistency
1 parent 003b4eb commit 382373c

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 Literal, Protocol
88
from typing_extensions import TypeVar
99

10-
T_co = TypeVar("T_co", covariant=True, default=ModuleType)
10+
NS_co = TypeVar("NS_co", covariant=True, 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:
@@ -30,11 +30,11 @@ class HasArrayNamespace(Protocol[T_co]):
3030

3131
def __array_namespace__(
3232
self, /, *, api_version: Literal["2021.12"] | None = None
33-
) -> T_co: ...
33+
) -> NS_co: ...
3434

3535

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

0 commit comments

Comments
 (0)