From 3ba669787e9e389652d828baf30f11283c028f43 Mon Sep 17 00:00:00 2001 From: ran Date: Thu, 19 Oct 2023 21:16:28 +0300 Subject: [PATCH] accidental typo --- py-polars/polars/utils/convert.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/py-polars/polars/utils/convert.py b/py-polars/polars/utils/convert.py index 52d074d70c2d..7d0bb979ee58 100644 --- a/py-polars/polars/utils/convert.py +++ b/py-polars/polars/utils/convert.py @@ -124,6 +124,7 @@ def _datetime_to_pl_timestamp(dt: datetime, time_unit: TimeUnit | None) -> int: f"`time_unit` must be one of {{'ms', 'us', 'ns'}}, got {time_unit!r}" ) + def _timedelta_to_pl_timedelta(td: timedelta, time_unit: TimeUnit | None) -> int: """Convert a Python timedelta object to a total number of subseconds.""" microseconds = td.microseconds @@ -179,7 +180,7 @@ def _to_python_datetime( if time_unit == "us": return EPOCH + timedelta(microseconds=value) elif time_unit == "ns": - return EPOCH + timedelt (microseconds=value // 1_000) + return EPOCH + timedelta(microseconds=value // 1_000) elif time_unit == "ms": return EPOCH + timedelta(milliseconds=value) else: