File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -361,23 +361,27 @@ def timedelta_range(
361361 if start is not None and end is not None :
362362 start = Timedelta (start )
363363 end = Timedelta (end )
364+ start = cast (Timedelta , start )
365+ end = cast (Timedelta , end )
364366 if abbrev_to_npy_unit (start .unit ) > abbrev_to_npy_unit (end .unit ):
365367 unit = cast ("TimeUnit" , start .unit )
366368 else :
367369 unit = cast ("TimeUnit" , end .unit )
368370 elif start is not None :
369371 start = Timedelta (start )
372+ start = cast (Timedelta , start )
370373 unit = cast ("TimeUnit" , start .unit )
371374 else :
372375 end = Timedelta (end )
376+ end = cast (Timedelta , end )
373377 unit = cast ("TimeUnit" , end .unit )
374378
375379 # Last we need to watch out for cases where the 'freq' implies a higher
376380 # unit than either start or end
377381 if freq is not None :
378382 freq = cast ("Tick | Day" , freq )
379383 creso = abbrev_to_npy_unit (unit )
380- if freq ._creso > creso :
384+ if freq ._creso > creso : # pyright: ignore[reportAttributeAccessIssue]
381385 unit = cast ("TimeUnit" , freq .base .freqstr )
382386
383387 tdarr = TimedeltaArray ._generate_range (
You can’t perform that action at this time.
0 commit comments