Skip to content
This repository was archived by the owner on Jun 10, 2020. It is now read-only.

Commit 837eec6

Browse files
author
Bas van Beek
committed
Replaced the nested unions with _ArrayLikeIntNested
1 parent 36efcf3 commit 837eec6

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

numpy-stubs/__init__.pyi

+2-6
Original file line numberDiff line numberDiff line change
@@ -810,17 +810,13 @@ _ScalarBuiltin = Union[str, bytes, dt.date, dt.timedelta, bool, int, float, comp
810810
_Scalar = Union[_ScalarBuiltin, generic]
811811

812812
# An array-like object consisting of integers
813-
# TODO: If possible, figure out a better way to deal with nested sequences
814813
_Int = Union[int, integer]
814+
_ArrayLikeIntNested = Any # TODO: wait for support for recursive types
815815
_ArrayLikeInt = Union[
816816
_Int,
817817
ndarray, # TODO: ndarray[int]
818818
Sequence[_Int],
819-
Sequence[Sequence[_Int]],
820-
Sequence[Sequence[Sequence[_Int]]],
821-
Sequence[Sequence[Sequence[Sequence[_Int]]]],
822-
Sequence[Sequence[Sequence[Sequence[Sequence[_Int]]]]],
823-
Sequence[Sequence[Sequence[Sequence[Sequence[Sequence[_Int]]]]]],
819+
Sequence[_ArrayLikeIntNested]
824820
]
825821

826822
# An array-like object consisting of strings

0 commit comments

Comments
 (0)