@@ -29,6 +29,7 @@ from pandas._libs.tslibs.timedeltas import Timedelta
2929from pandas ._typing import (
3030 S1 ,
3131 S2 ,
32+ S3 ,
3233 AxisIndex ,
3334 DropKeep ,
3435 DTypeLike ,
@@ -322,6 +323,30 @@ class ElementOpsMixin(Generic[S2]):
322323 def _proto_rfloordiv (
323324 self : ElementOpsMixin [Timedelta ], other : timedelta | np .timedelta64 | Timedelta
324325 ) -> ElementOpsMixin [int ]: ...
326+ @overload
327+ def _proto_mod (
328+ self : ElementOpsMixin [int ], other : int | np .integer
329+ ) -> ElementOpsMixin [int ]: ...
330+ @overload
331+ def _proto_mod (
332+ self : ElementOpsMixin [float ], other : float | np .floating
333+ ) -> ElementOpsMixin [float ]: ...
334+ @overload
335+ def _proto_mod (
336+ self : ElementOpsMixin [Timedelta ], other : timedelta | np .timedelta64 | Timedelta
337+ ) -> ElementOpsMixin [Timedelta ]: ...
338+ @overload
339+ def _proto_rmod (
340+ self : ElementOpsMixin [int ], other : int | np .integer
341+ ) -> ElementOpsMixin [int ]: ...
342+ @overload
343+ def _proto_rmod (
344+ self : ElementOpsMixin [float ], other : float | np .floating
345+ ) -> ElementOpsMixin [float ]: ...
346+ @overload
347+ def _proto_rmod (
348+ self : ElementOpsMixin [Timedelta ], other : timedelta | np .timedelta64 | Timedelta
349+ ) -> ElementOpsMixin [Timedelta ]: ...
325350
326351@type_check_only
327352class Supports_ProtoAdd (Protocol [_T_contra , S2 ]):
@@ -354,3 +379,21 @@ class Supports_ProtoFloorDiv(Protocol[_T_contra, S2]):
354379@type_check_only
355380class Supports_ProtoRFloorDiv (Protocol [_T_contra , S2 ]):
356381 def _proto_rfloordiv (self , other : _T_contra , / ) -> ElementOpsMixin [S2 ]: ...
382+
383+ @type_check_only
384+ class Supports_ProtoMod (Protocol [_T_contra , S2 ]):
385+ def _proto_mod (self , other : _T_contra , / ) -> ElementOpsMixin [S2 ]: ...
386+
387+ @type_check_only
388+ class Supports_ProtoRMod (Protocol [_T_contra , S2 ]):
389+ def _proto_rmod (self , other : _T_contra , / ) -> ElementOpsMixin [S2 ]: ...
390+
391+ @type_check_only
392+ class Supports_ProtoDivMod (Protocol [_T_contra , S2 , S3 ]):
393+ def _proto_floordiv (self , other : _T_contra , / ) -> ElementOpsMixin [S2 ]: ...
394+ def _proto_mod (self , other : _T_contra , / ) -> ElementOpsMixin [S3 ]: ...
395+
396+ @type_check_only
397+ class Supports_ProtoRDivMod (Protocol [_T_contra , S2 , S3 ]):
398+ def _proto_rfloordiv (self , other : _T_contra , / ) -> ElementOpsMixin [S2 ]: ...
399+ def _proto_rmod (self , other : _T_contra , / ) -> ElementOpsMixin [S3 ]: ...
0 commit comments