Skip to content

Commit

Permalink
refactor(api)!: change as_interval unit argument to be positional…
Browse files Browse the repository at this point in the history
…-only
  • Loading branch information
cpcloud committed Feb 5, 2025
1 parent 7f0b194 commit e470cb8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ibis/expr/types/numeric.py
Original file line number Diff line number Diff line change
Expand Up @@ -1454,6 +1454,7 @@ def as_timestamp(self, unit: Literal["s", "ms", "us"], /) -> ir.TimestampValue:
def as_interval(
self,
unit: Literal["Y", "M", "W", "D", "h", "m", "s", "ms", "us", "ns"] = "s",
/,
) -> ir.IntervalValue:
"""Convert an integer to an interval.
Expand Down Expand Up @@ -1518,8 +1519,9 @@ def to_timestamp(
def to_interval(
self,
unit: Literal["Y", "M", "W", "D", "h", "m", "s", "ms", "us", "ns"] = "s",
/,
) -> ir.IntervalValue:
return self.as_interval(unit=unit)
return self.as_interval(unit)

def convert_base(
self,
Expand Down

0 comments on commit e470cb8

Please sign in to comment.