Skip to content

Commit

Permalink
fix(python): Fix invalid DeprecationWarning generated from `date_rang…
Browse files Browse the repository at this point in the history
…e` defined with 'saturating' interval (pola-rs#12311)

Co-authored-by: Stijn de Gooijer <[email protected]>
  • Loading branch information
alexander-beedie and stinodego authored Nov 8, 2023
1 parent 267563e commit fa2b82a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions py-polars/polars/functions/range/date_range.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,11 +389,11 @@ def _warn_for_deprecated_date_range_use(
if (
isinstance(start, datetime)
or isinstance(end, datetime)
or "s" in interval
or "h" in interval
or ("m" in interval and "mo" not in interval)
or time_unit is not None
or time_zone is not None
or ("h" in interval)
or ("m" in interval.replace("mo", ""))
or ("s" in interval.replace("saturating", ""))
):
issue_deprecation_warning(
"Creating Datetime ranges using `date_range(s)` is deprecated."
Expand Down

0 comments on commit fa2b82a

Please sign in to comment.