1
- from typing import overload
1
+ from typing import (
2
+ Hashable ,
3
+ Literal ,
4
+ overload ,
5
+ )
2
6
7
+ from pandas import DateOffset
3
8
from pandas .core .indexes .accessors import TimedeltaIndexProperties
4
9
from pandas .core .indexes .datetimelike import DatetimeTimedeltaMixin
5
10
from pandas .core .indexes .datetimes import DatetimeIndex
@@ -9,7 +14,10 @@ from pandas._libs import (
9
14
Timedelta ,
10
15
Timestamp ,
11
16
)
12
- from pandas ._typing import num
17
+ from pandas ._typing import (
18
+ TimedeltaConvertibleTypes ,
19
+ num ,
20
+ )
13
21
14
22
class TimedeltaIndex (DatetimeTimedeltaMixin , TimedeltaIndexProperties ):
15
23
def __new__ (
@@ -42,5 +50,10 @@ class TimedeltaIndex(DatetimeTimedeltaMixin, TimedeltaIndexProperties):
42
50
def to_series (self , index = ..., name = ...) -> TimedeltaSeries : ...
43
51
44
52
def timedelta_range (
45
- start = ..., end = ..., periods = ..., freq = ..., name = ..., closed = ...
53
+ start : TimedeltaConvertibleTypes = ...,
54
+ end : TimedeltaConvertibleTypes = ...,
55
+ periods : int | None = ...,
56
+ freq : str | DateOffset | None = ...,
57
+ name : Hashable | None = ...,
58
+ closed : Literal ["left" , "right" ] | None = ...,
46
59
) -> TimedeltaIndex : ...
0 commit comments