@@ -157,7 +157,7 @@ _DTRoundingMethodReturnType = TypeVar(
157
157
TimedeltaSeries ,
158
158
TimestampSeries ,
159
159
DatetimeIndex ,
160
- # TimedeltaIndex
160
+ TimedeltaIndex ,
161
161
)
162
162
163
163
class _DatetimeRoundingMethods (Generic [_DTRoundingMethodReturnType ]):
@@ -378,31 +378,8 @@ class DatetimeIndexProperties(
378
378
self , axis : int | None = ..., ddof : int = ..., skipna : bool = ...
379
379
) -> Timedelta : ...
380
380
381
- # For some reason, using TimedeltaIndex as an argument to _DatetimeRoundingMethods
382
- # doesn't work for pyright. So we just make the rounding methods explicit here.
383
381
class TimedeltaIndexProperties (
384
382
Properties ,
385
383
_TimedeltaPropertiesNoRounding [Index , Index ],
386
- # _DatetimeRoundingMethods[TimedeltaIndex],
387
- ):
388
- def round (
389
- self ,
390
- freq : str | BaseOffset | None ,
391
- ambiguous : Literal ["raise" , "infer" , "NaT" ] | np_ndarray_bool = ...,
392
- nonexistent : Literal ["shift_forward" , "shift_backward" , "NaT" , "raise" ]
393
- | Timedelta = ...,
394
- ) -> TimedeltaIndex : ...
395
- def floor (
396
- self ,
397
- freq : str | BaseOffset | None ,
398
- ambiguous : Literal ["raise" , "infer" , "NaT" ] | np_ndarray_bool = ...,
399
- nonexistent : Literal ["shift_forward" , "shift_backward" , "NaT" , "raise" ]
400
- | Timedelta = ...,
401
- ) -> TimedeltaIndex : ...
402
- def ceil (
403
- self ,
404
- freq : str | BaseOffset | None ,
405
- ambiguous : Literal ["raise" , "infer" , "NaT" ] | np_ndarray_bool = ...,
406
- nonexistent : Literal ["shift_forward" , "shift_backward" , "NaT" , "raise" ]
407
- | Timedelta = ...,
408
- ) -> TimedeltaIndex : ...
384
+ _DatetimeRoundingMethods [TimedeltaIndex ],
385
+ ): ...
0 commit comments