Skip to content

Commit 8863e26

Browse files
committed
stub fixup
1 parent 6fae9cc commit 8863e26

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pandas/core/indexes/timedeltas.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22

33
from __future__ import annotations
44

5-
from typing import TYPE_CHECKING
5+
from typing import (
6+
TYPE_CHECKING,
7+
cast,
8+
)
69

710
from pandas._libs import (
811
index as libindex,
@@ -373,6 +376,6 @@ def timedelta_range(
373376
unit = freq.base.freqstr
374377

375378
tdarr = TimedeltaArray._generate_range(
376-
start, end, periods, freq, closed=closed, unit=unit
379+
start, end, periods, freq, closed=closed, unit=cast("TimeUnit", unit)
377380
)
378381
return TimedeltaIndex._simple_new(tdarr, name=name)

0 commit comments

Comments
 (0)