@@ -56,8 +56,9 @@ from pandas._typing import (
5656 C2 ,
5757 S1 ,
5858 S1_CO ,
59- S1_CO_NSDT ,
6059 S1_CT ,
60+ S2_CO_NSDT ,
61+ S2_CT ,
6162 T_COMPLEX ,
6263 T_INT ,
6364 AnyAll ,
@@ -753,30 +754,32 @@ class Index(IndexOpsMixin[S1]):
753754 @overload
754755 def __mul__ (self , other : np_ndarray_dt ) -> Never : ...
755756 @overload
756- def __mul__ (self : Index [complex ], other : np_ndarray_td ) -> Never : ...
757+ def __mul__ (self : Index [bool ] | Index [ complex ], other : np_ndarray_td ) -> Never : ...
757758 # pandas-dev/pandas#62524: An index of Python native timedeltas can be
758759 # produced, instead of a TimedeltaIndex, hence the overload
759760 @overload
760761 def __mul__ ( # type: ignore[overload-overlap]
761- self : Index [bool ] | Index [ int ] | Index [float ], other : Sequence [timedelta ]
762+ self : Index [int ] | Index [float ], other : Sequence [timedelta ]
762763 ) -> Index [Timedelta ]: ...
763764 @overload
764765 def __mul__ (
765- self : Index [bool ] | Index [ int ] | Index [float ],
766+ self : Index [int ] | Index [float ],
766767 other : timedelta | Sequence [Timedelta ] | np .timedelta64 | np_ndarray_td ,
767768 ) -> TimedeltaIndex : ...
768769 @overload
769- def __mul__ (self : Index [Timedelta ], other : np_ndarray_complex ) -> Never : ...
770+ def __mul__ (
771+ self : Index [Timedelta ], other : np_ndarray_bool | np_ndarray_complex
772+ ) -> Never : ...
770773 @overload
771774 def __mul__ (
772775 self : Index [Timedelta ],
773776 other : (
774- float
775- | Sequence [float ]
776- | np_ndarray_bool
777+ Just [int ]
778+ | Just [float ]
779+ | Sequence [Just [int ]]
780+ | Sequence [Just [float ]]
777781 | np_ndarray_anyint
778782 | np_ndarray_float
779- | Index [bool ]
780783 | Index [int ]
781784 | Index [float ]
782785 ),
@@ -807,11 +810,11 @@ class Index(IndexOpsMixin[S1]):
807810 ) -> Index [complex ]: ...
808811 @overload
809812 def __mul__ (
810- self : Index [S1_CT ],
813+ self : Index [S2_CT ],
811814 other : (
812- SupportsRMul [S1_CT , S1_CO_NSDT ] | Sequence [SupportsRMul [S1_CT , S1_CO_NSDT ]]
815+ SupportsRMul [S2_CT , S2_CO_NSDT ] | Sequence [SupportsRMul [S2_CT , S2_CO_NSDT ]]
813816 ),
814- ) -> Index [S1_CO_NSDT ]: ...
817+ ) -> Index [S2_CO_NSDT ]: ...
815818 @overload
816819 def __mul__ (
817820 self : Index [T_COMPLEX ], other : np_ndarray_bool | Index [bool ]
@@ -843,30 +846,32 @@ class Index(IndexOpsMixin[S1]):
843846 @overload
844847 def __rmul__ (self , other : np_ndarray_dt ) -> Never : ...
845848 @overload
846- def __rmul__ (self : Index [complex ], other : np_ndarray_td ) -> Never : ...
849+ def __rmul__ (self : Index [bool ] | Index [ complex ], other : np_ndarray_td ) -> Never : ...
847850 # pandas-dev/pandas#62524: An index of Python native timedeltas can be
848851 # produced, instead of a TimedeltaIndex, hence the overload
849852 @overload
850853 def __rmul__ ( # type: ignore[overload-overlap]
851- self : Index [bool ] | Index [ int ] | Index [float ], other : Sequence [timedelta ]
854+ self : Index [int ] | Index [float ], other : Sequence [timedelta ]
852855 ) -> Index [Timedelta ]: ...
853856 @overload
854857 def __rmul__ (
855- self : Index [bool ] | Index [ int ] | Index [float ],
858+ self : Index [int ] | Index [float ],
856859 other : timedelta | Sequence [Timedelta ] | np .timedelta64 | np_ndarray_td ,
857860 ) -> TimedeltaIndex : ...
858861 @overload
859- def __rmul__ (self : Index [Timedelta ], other : np_ndarray_complex ) -> Never : ...
862+ def __rmul__ (
863+ self : Index [Timedelta ], other : np_ndarray_bool | np_ndarray_complex
864+ ) -> Never : ...
860865 @overload
861866 def __rmul__ (
862867 self : Index [Timedelta ],
863868 other : (
864- float
865- | Sequence [float ]
866- | np_ndarray_bool
869+ Just [int ]
870+ | Just [float ]
871+ | Sequence [Just [int ]]
872+ | Sequence [Just [float ]]
867873 | np_ndarray_anyint
868874 | np_ndarray_float
869- | Index [bool ]
870875 | Index [int ]
871876 | Index [float ]
872877 ),
@@ -897,11 +902,11 @@ class Index(IndexOpsMixin[S1]):
897902 ) -> Index [complex ]: ...
898903 @overload
899904 def __rmul__ (
900- self : Index [S1_CT ],
905+ self : Index [S2_CT ],
901906 other : (
902- SupportsMul [S1_CT , S1_CO_NSDT ] | Sequence [SupportsMul [S1_CT , S1_CO_NSDT ]]
907+ SupportsMul [S2_CT , S2_CO_NSDT ] | Sequence [SupportsMul [S2_CT , S2_CO_NSDT ]]
903908 ),
904- ) -> Index [S1_CO_NSDT ]: ...
909+ ) -> Index [S2_CO_NSDT ]: ...
905910 @overload
906911 def __rmul__ (
907912 self : Index [T_COMPLEX ], other : np_ndarray_bool | Index [bool ]
0 commit comments