Skip to content

Commit 0023b02

Browse files
committed
https://github.com/pandas-dev/pandas-stubs/pull/1462/files#r2480913506
1 parent b88da43 commit 0023b02

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

pandas-stubs/core/indexes/category.pyi

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,23 @@ from collections.abc import (
22
Hashable,
33
Iterable,
44
)
5-
from typing import (
6-
Any,
7-
final,
8-
)
5+
from typing import final
96

10-
from numpy import typing as npt
11-
from pandas.core import accessor
7+
import numpy as np
8+
from pandas.core.accessor import PandasDelegate
129
from pandas.core.arrays.categorical import Categorical
1310
from pandas.core.indexes.base import Index
1411
from pandas.core.indexes.extension import ExtensionIndex
1512
from typing_extensions import Self
1613

17-
from pandas._typing import S1
14+
from pandas._typing import (
15+
S1,
16+
np_1darray,
17+
)
1818

19-
class CategoricalIndex(ExtensionIndex[S1], accessor.PandasDelegate):
20-
codes: npt.NDArray[Any] = ...
21-
categories: Index = ...
19+
class CategoricalIndex(ExtensionIndex[S1], PandasDelegate):
20+
codes: np_1darray[np.intp] = ...
21+
categories: Index[S1] = ...
2222
@property
2323
def array(self) -> Categorical: ... # type: ignore[override] # pyrefly: ignore[bad-override]
2424
def __new__(

0 commit comments

Comments
 (0)