@@ -34,6 +34,7 @@ from pandas._libs.tslibs.timedeltas import Timedelta
3434from pandas ._typing import (
3535 S1 ,
3636 S2 ,
37+ S3 ,
3738 AxisIndex ,
3839 DropKeep ,
3940 DTypeLike ,
@@ -390,6 +391,30 @@ class ElementOpsMixin(Generic[S2]):
390391 def _proto_rfloordiv (
391392 self : ElementOpsMixin [Timedelta ], other : timedelta | np .timedelta64 | Timedelta
392393 ) -> ElementOpsMixin [int ]: ...
394+ @overload
395+ def _proto_mod (
396+ self : ElementOpsMixin [int ], other : int | np .integer
397+ ) -> ElementOpsMixin [int ]: ...
398+ @overload
399+ def _proto_mod (
400+ self : ElementOpsMixin [float ], other : float | np .floating
401+ ) -> ElementOpsMixin [float ]: ...
402+ @overload
403+ def _proto_mod (
404+ self : ElementOpsMixin [Timedelta ], other : timedelta | np .timedelta64 | Timedelta
405+ ) -> ElementOpsMixin [Timedelta ]: ...
406+ @overload
407+ def _proto_rmod (
408+ self : ElementOpsMixin [int ], other : int | np .integer
409+ ) -> ElementOpsMixin [int ]: ...
410+ @overload
411+ def _proto_rmod (
412+ self : ElementOpsMixin [float ], other : float | np .floating
413+ ) -> ElementOpsMixin [float ]: ...
414+ @overload
415+ def _proto_rmod (
416+ self : ElementOpsMixin [Timedelta ], other : timedelta | np .timedelta64 | Timedelta
417+ ) -> ElementOpsMixin [Timedelta ]: ...
393418
394419@type_check_only
395420class Supports_ProtoAdd (Protocol [T_contra , S2 ]):
@@ -422,3 +447,21 @@ class Supports_ProtoFloorDiv(Protocol[T_contra, S2]):
422447@type_check_only
423448class Supports_ProtoRFloorDiv (Protocol [T_contra , S2 ]):
424449 def _proto_rfloordiv (self , other : T_contra , / ) -> ElementOpsMixin [S2 ]: ...
450+
451+ @type_check_only
452+ class Supports_ProtoMod (Protocol [T_contra , S2 ]):
453+ def _proto_mod (self , other : T_contra , / ) -> ElementOpsMixin [S2 ]: ...
454+
455+ @type_check_only
456+ class Supports_ProtoRMod (Protocol [T_contra , S2 ]):
457+ def _proto_rmod (self , other : T_contra , / ) -> ElementOpsMixin [S2 ]: ...
458+
459+ @type_check_only
460+ class Supports_ProtoDivMod (Protocol [T_contra , S2 , S3 ]):
461+ def _proto_floordiv (self , other : T_contra , / ) -> ElementOpsMixin [S2 ]: ...
462+ def _proto_mod (self , other : T_contra , / ) -> ElementOpsMixin [S3 ]: ...
463+
464+ @type_check_only
465+ class Supports_ProtoRDivMod (Protocol [T_contra , S2 , S3 ]):
466+ def _proto_rfloordiv (self , other : T_contra , / ) -> ElementOpsMixin [S2 ]: ...
467+ def _proto_rmod (self , other : T_contra , / ) -> ElementOpsMixin [S3 ]: ...
0 commit comments