Skip to content

Commit 346365d

Browse files
authored
Merge pull request #76 from lucascolley/annotations
TYP: import annotations for sklearn
2 parents 84bf725 + b6d43d1 commit 346365d

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

Diff for: src/array_api_extra/_funcs.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
"""Public API Functions."""
22

3+
# https://github.com/scikit-learn/scikit-learn/pull/27910#issuecomment-2568023972
4+
from __future__ import annotations
5+
36
import operator
47
import warnings
58

@@ -719,7 +722,7 @@ def __init__(
719722
self._x = x
720723
self._idx = idx
721724

722-
def __getitem__(self, idx: Index, /) -> "at": # numpydoc ignore=PR01,RT01
725+
def __getitem__(self, idx: Index, /) -> at: # numpydoc ignore=PR01,RT01
723726
"""
724727
Allow for the alternate syntax ``at(x)[start:stop:step]``.
725728

Diff for: src/array_api_extra/_lib/_compat.pyi

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
"""Static type stubs for `_compat.py`."""
22

3+
# https://github.com/scikit-learn/scikit-learn/pull/27910#issuecomment-2568023972
4+
from __future__ import annotations
5+
36
from types import ModuleType
47

58
from ._typing import Array, Device

Diff for: src/array_api_extra/_lib/_utils.py

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
"""Utility functions used by `array_api_extra/_funcs.py`."""
22

3+
# https://github.com/scikit-learn/scikit-learn/pull/27910#issuecomment-2568023972
4+
from __future__ import annotations
5+
36
from . import _compat
47
from ._typing import Array, ModuleType
58

0 commit comments

Comments
 (0)