Skip to content

Commit

Permalink
Remove from __future__ import annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
crusaderky committed Dec 12, 2024
1 parent ace53ed commit f5c3016
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
4 changes: 1 addition & 3 deletions src/array_api_extra/_funcs.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import annotations

import operator
import warnings

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

def __getitem__(self, idx: Index, /) -> at:
def __getitem__(self, idx: Index, /) -> "at":
"""Allow for the alternate syntax ``at(x)[start:stop:step]``,
which looks prettier than ``at(x, slice(start, stop, step))``
and feels more intuitive coming from the JAX documentation.
Expand Down
7 changes: 1 addition & 6 deletions tests/test_at.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
from __future__ import annotations

from collections.abc import Generator
from contextlib import contextmanager
from importlib import import_module
from typing import TYPE_CHECKING

import numpy as np
import pytest
Expand All @@ -15,9 +12,7 @@
)

from array_api_extra import at

if TYPE_CHECKING:
from array_api_extra._lib._typing import Array
from array_api_extra._lib._typing import Array

all_libraries = (
"array_api_strict",
Expand Down

0 comments on commit f5c3016

Please sign in to comment.