Skip to content

Commit f5c3016

Browse files
committed
Remove from __future__ import annotations
1 parent ace53ed commit f5c3016

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

src/array_api_extra/_funcs.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from __future__ import annotations
2-
31
import operator
42
import warnings
53

@@ -672,7 +670,7 @@ def __init__(self, x: Array, idx: Index = _undef, /) -> None:
672670
self._x = x
673671
self._idx = idx
674672

675-
def __getitem__(self, idx: Index, /) -> at:
673+
def __getitem__(self, idx: Index, /) -> "at":
676674
"""Allow for the alternate syntax ``at(x)[start:stop:step]``,
677675
which looks prettier than ``at(x, slice(start, stop, step))``
678676
and feels more intuitive coming from the JAX documentation.

tests/test_at.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
from __future__ import annotations
2-
31
from collections.abc import Generator
42
from contextlib import contextmanager
53
from importlib import import_module
6-
from typing import TYPE_CHECKING
74

85
import numpy as np
96
import pytest
@@ -15,9 +12,7 @@
1512
)
1613

1714
from array_api_extra import at
18-
19-
if TYPE_CHECKING:
20-
from array_api_extra._lib._typing import Array
15+
from array_api_extra._lib._typing import Array
2116

2217
all_libraries = (
2318
"array_api_strict",

0 commit comments

Comments
 (0)