11from collections .abc import Sequence
22from typing import (
3+ Any ,
34 Literal ,
45 overload ,
56)
@@ -102,7 +103,7 @@ def cut(
102103 include_lowest : bool = ...,
103104 duplicates : Literal ["raise" , "drop" ] = ...,
104105 ordered : bool = ...,
105- ) -> tuple [Series , IntervalIndex ]: ...
106+ ) -> tuple [Series , IntervalIndex [ Any ] ]: ...
106107@overload
107108def cut (
108109 x : Sequence [float ] | np_ndarray_anyint | np_ndarray_float | Index ,
@@ -132,7 +133,9 @@ def cut(
132133@overload
133134def cut (
134135 x : Sequence [float ] | np_ndarray_anyint | np_ndarray_float | Index ,
135- bins : int | Sequence [float ] | Index [int ] | Index [float ] | IntervalIndex | Series ,
136+ bins : (
137+ int | Sequence [float ] | Index [int ] | Index [float ] | IntervalIndex [Any ] | Series
138+ ),
136139 right : bool = ...,
137140 * ,
138141 labels : Literal [False ],
@@ -163,7 +166,9 @@ def cut(
163166@overload
164167def cut (
165168 x : Series ,
166- bins : int | Sequence [float ] | Index [int ] | Index [float ] | IntervalIndex | Series ,
169+ bins : (
170+ int | Sequence [float ] | Index [int ] | Index [float ] | IntervalIndex [Any ] | Series
171+ ),
167172 right : bool = ...,
168173 labels : Literal [False ] | Sequence [Label ] | None = ...,
169174 retbins : Literal [False ] = False ,
@@ -175,7 +180,9 @@ def cut(
175180@overload
176181def cut (
177182 x : Sequence [float ] | np_ndarray_anyint | np_ndarray_float | Index ,
178- bins : int | Sequence [float ] | Index [int ] | Index [float ] | IntervalIndex | Series ,
183+ bins : (
184+ int | Sequence [float ] | Index [int ] | Index [float ] | IntervalIndex [Any ] | Series
185+ ),
179186 right : bool = ...,
180187 labels : Sequence [Label ] | None = ...,
181188 retbins : Literal [False ] = False ,
0 commit comments