@@ -33,6 +33,7 @@ from pandas._libs.tslibs.timedeltas import Timedelta
3333from pandas ._typing import (
3434 S1 ,
3535 S2 ,
36+ S3 ,
3637 AxisIndex ,
3738 DropKeep ,
3839 DTypeLike ,
@@ -387,6 +388,30 @@ class ElementOpsMixin(Generic[S2]):
387388 def _proto_rfloordiv (
388389 self : ElementOpsMixin [Timedelta ], other : timedelta | np .timedelta64 | Timedelta
389390 ) -> ElementOpsMixin [int ]: ...
391+ @overload
392+ def _proto_mod (
393+ self : ElementOpsMixin [int ], other : int | np .integer
394+ ) -> ElementOpsMixin [int ]: ...
395+ @overload
396+ def _proto_mod (
397+ self : ElementOpsMixin [float ], other : float | np .floating
398+ ) -> ElementOpsMixin [float ]: ...
399+ @overload
400+ def _proto_mod (
401+ self : ElementOpsMixin [Timedelta ], other : timedelta | np .timedelta64 | Timedelta
402+ ) -> ElementOpsMixin [Timedelta ]: ...
403+ @overload
404+ def _proto_rmod (
405+ self : ElementOpsMixin [int ], other : int | np .integer
406+ ) -> ElementOpsMixin [int ]: ...
407+ @overload
408+ def _proto_rmod (
409+ self : ElementOpsMixin [float ], other : float | np .floating
410+ ) -> ElementOpsMixin [float ]: ...
411+ @overload
412+ def _proto_rmod (
413+ self : ElementOpsMixin [Timedelta ], other : timedelta | np .timedelta64 | Timedelta
414+ ) -> ElementOpsMixin [Timedelta ]: ...
390415
391416@type_check_only
392417class Supports_ProtoAdd (Protocol [T_contra , S2 ]):
@@ -419,3 +444,21 @@ class Supports_ProtoFloorDiv(Protocol[T_contra, S2]):
419444@type_check_only
420445class Supports_ProtoRFloorDiv (Protocol [T_contra , S2 ]):
421446 def _proto_rfloordiv (self , other : T_contra , / ) -> ElementOpsMixin [S2 ]: ...
447+
448+ @type_check_only
449+ class Supports_ProtoMod (Protocol [T_contra , S2 ]):
450+ def _proto_mod (self , other : T_contra , / ) -> ElementOpsMixin [S2 ]: ...
451+
452+ @type_check_only
453+ class Supports_ProtoRMod (Protocol [T_contra , S2 ]):
454+ def _proto_rmod (self , other : T_contra , / ) -> ElementOpsMixin [S2 ]: ...
455+
456+ @type_check_only
457+ class Supports_ProtoDivMod (Protocol [T_contra , S2 , S3 ]):
458+ def _proto_floordiv (self , other : T_contra , / ) -> ElementOpsMixin [S2 ]: ...
459+ def _proto_mod (self , other : T_contra , / ) -> ElementOpsMixin [S3 ]: ...
460+
461+ @type_check_only
462+ class Supports_ProtoRDivMod (Protocol [T_contra , S2 , S3 ]):
463+ def _proto_rfloordiv (self , other : T_contra , / ) -> ElementOpsMixin [S2 ]: ...
464+ def _proto_rmod (self , other : T_contra , / ) -> ElementOpsMixin [S3 ]: ...
0 commit comments