@@ -14,10 +14,10 @@ from typing import (
1414
1515import numpy as np
1616from pandas .core .accessor import PandasDelegate
17- from pandas .core .arrays .base import ExtensionArray
1817from pandas .core .arrays .categorical import Categorical
1918from pandas .core .arrays .datetimes import DatetimeArray
2019from pandas .core .arrays .interval import IntervalArray
20+ from pandas .core .arrays .numpy_ import NumpyExtensionArray
2121from pandas .core .arrays .period import PeriodArray
2222from pandas .core .arrays .timedeltas import TimedeltaArray
2323from pandas .core .base import (
@@ -49,8 +49,6 @@ from pandas._typing import (
4949 np_ndarray_bool ,
5050)
5151
52- from pandas .core .dtypes .dtypes import CategoricalDtype
53-
5452class Properties (PandasDelegate , NoNewAttributesMixin ): ...
5553
5654_DTFieldOpsReturnType = TypeVar ("_DTFieldOpsReturnType" , bound = Series [int ] | Index [int ])
@@ -462,26 +460,31 @@ class DtDescriptor:
462460class ArrayDescriptor :
463461 @overload
464462 def __get__ (
465- self , instance : IndexOpsMixin [Never ], owner : type [IndexOpsMixin ]
466- ) -> ExtensionArray : ...
463+ self , instance : IndexOpsMixin [Never , Never ], owner : type [IndexOpsMixin ]
464+ ) -> NumpyExtensionArray : ...
467465 @overload
468466 def __get__ (
469- self , instance : IndexOpsMixin [CategoricalDtype ], owner : type [IndexOpsMixin ]
467+ self , instance : IndexOpsMixin [Never , Categorical ], owner : type [IndexOpsMixin ]
470468 ) -> Categorical : ...
471469 @overload
472470 def __get__ (
473- self , instance : IndexOpsMixin [Interval ], owner : type [IndexOpsMixin ]
471+ self ,
472+ instance : IndexOpsMixin [Interval , IntervalArray ],
473+ owner : type [IndexOpsMixin ],
474474 ) -> IntervalArray : ...
475475 @overload
476476 def __get__ (
477- self , instance : IndexOpsMixin [Timestamp ], owner : type [IndexOpsMixin ]
477+ self ,
478+ instance : IndexOpsMixin [Timestamp , DatetimeArray ],
479+ owner : type [IndexOpsMixin ],
478480 ) -> DatetimeArray : ...
479481 @overload
480482 def __get__ (
481- self , instance : IndexOpsMixin [Timedelta ], owner : type [IndexOpsMixin ]
483+ self ,
484+ instance : IndexOpsMixin [Timedelta , TimedeltaArray ],
485+ owner : type [IndexOpsMixin ],
482486 ) -> TimedeltaArray : ...
483- # should be NumpyExtensionArray
484487 @overload
485488 def __get__ (
486- self , instance : IndexOpsMixin , owner : type [IndexOpsMixin ]
487- ) -> ExtensionArray : ...
489+ self , instance : IndexOpsMixin [ int , Never ] , owner : type [IndexOpsMixin ]
490+ ) -> NumpyExtensionArray : ...
0 commit comments