Skip to content

Commit 28f1be4

Browse files
committed
add type hints to maybe_casted_values
1 parent 48f23df commit 28f1be4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pandas/core/dtypes/cast.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@
9494
if TYPE_CHECKING:
9595
from pandas import Series
9696
from pandas.core.arrays import ExtensionArray
97+
from pandas.core.indexes.base import Index
9798
from pandas.core.indexes.datetimes import DatetimeIndex
9899

99100
_int8_max = np.iinfo(np.int8).max
@@ -460,7 +461,9 @@ def changeit():
460461
return result, False
461462

462463

463-
def maybe_casted_values(index, codes=None):
464+
def maybe_casted_values(
465+
index: "Index", codes: Optional[Sequence[int]] = None
466+
) -> ArrayLike:
464467
"""
465468
Convert an index, given directly or as a pair (level, code), to a 1D array.
466469

0 commit comments

Comments
 (0)