arrow icon indicating copy to clipboard operation
arrow copied to clipboard

Add native support for Arrow objects in span_range

Open ParadoxShmaradox opened this issue 4 years ago • 0 comments

Issue Description

The span_range function typehint the start and end as datetime objects.

def span_range( cls, frame: _T_FRAMES, start: dt_datetime, end: dt_datetime, tz: Optional[TZ_EXPR] = None, limit: Optional[int] = None, bounds: _BOUNDS = "[)", exact: bool = False, ) -> Iterable[Tuple["Arrow", "Arrow"]]

It's will happily work with Arrow objects.

This works because the fromdatetime function will take an Arrow object and convert it again to an Arrow object.

I believe the correct usage it to natively support Arrow objects as input without explicitly converting an Arrow object to datetime just to be converted again internally.

ParadoxShmaradox avatar Jun 09 '21 15:06 ParadoxShmaradox