@@ -3,6 +3,7 @@ from collections.abc import (
33 Iterator ,
44 Sequence ,
55)
6+ from datetime import timedelta
67from typing import (
78 Any ,
89 Generic ,
@@ -175,7 +176,6 @@ NumListLike: TypeAlias = (
175176 | np_ndarray_complex
176177 | dict [str , np .ndarray ]
177178 | Sequence [complex ]
178- | IndexOpsMixin [complex ]
179179)
180180
181181@type_check_only
@@ -266,6 +266,38 @@ class ElementOpsMixin(Generic[S2]):
266266 def _proto_rmul (
267267 self : ElementOpsMixin [str ], other : Just [int ] | np .integer
268268 ) -> ElementOpsMixin [str ]: ...
269+ @overload
270+ def _proto_truediv (
271+ self : ElementOpsMixin [int ], other : int | np .integer
272+ ) -> ElementOpsMixin [float ]: ...
273+ @overload
274+ def _proto_truediv (
275+ self : ElementOpsMixin [float ], other : float | np .floating
276+ ) -> ElementOpsMixin [float ]: ...
277+ @overload
278+ def _proto_truediv (
279+ self : ElementOpsMixin [complex ], other : complex | np .complexfloating
280+ ) -> ElementOpsMixin [complex ]: ...
281+ @overload
282+ def _proto_truediv (
283+ self : ElementOpsMixin [Timedelta ], other : timedelta | Timedelta | np .timedelta64
284+ ) -> ElementOpsMixin [float ]: ...
285+ @overload
286+ def _proto_rtruediv (
287+ self : ElementOpsMixin [int ], other : int | np .integer
288+ ) -> ElementOpsMixin [float ]: ...
289+ @overload
290+ def _proto_rtruediv (
291+ self : ElementOpsMixin [float ], other : float | np .floating
292+ ) -> ElementOpsMixin [float ]: ...
293+ @overload
294+ def _proto_rtruediv (
295+ self : ElementOpsMixin [complex ], other : complex | np .complexfloating
296+ ) -> ElementOpsMixin [complex ]: ...
297+ @overload
298+ def _proto_rtruediv (
299+ self : ElementOpsMixin [Timedelta ], other : timedelta | Timedelta | np .timedelta64
300+ ) -> ElementOpsMixin [float ]: ...
269301
270302@type_check_only
271303class Supports_ProtoAdd (Protocol [_T_contra , S2 ]):
@@ -282,3 +314,11 @@ class Supports_ProtoMul(Protocol[_T_contra, S2]):
282314@type_check_only
283315class Supports_ProtoRMul (Protocol [_T_contra , S2 ]):
284316 def _proto_rmul (self , other : _T_contra , / ) -> ElementOpsMixin [S2 ]: ...
317+
318+ @type_check_only
319+ class Supports_ProtoTrueDiv (Protocol [_T_contra , S2 ]):
320+ def _proto_truediv (self , other : _T_contra , / ) -> ElementOpsMixin [S2 ]: ...
321+
322+ @type_check_only
323+ class Supports_ProtoRTrueDiv (Protocol [_T_contra , S2 ]):
324+ def _proto_rtruediv (self , other : _T_contra , / ) -> ElementOpsMixin [S2 ]: ...
0 commit comments