From 4fe6efa6e7e0240e42abb6d4d30d3d51a3cf8ed1 Mon Sep 17 00:00:00 2001 From: Marin Guadarrama <13213322+maringuadarrama@users.noreply.github.com> Date: Thu, 12 Nov 2026 16:09:29 -0600 Subject: [PATCH] [python-dateutil] relativedelta accepts float durations relativedelta(days=1.5), weeks=, hours=, minutes=, seconds= and microseconds= are accepted at runtime and normalised by _fix(); only years and months must be integral (ValueError otherwise), so they stay int. Co-Authored-By: Claude Opus 5.5 --- stubs/python-dateutil/dateutil/relativedelta.pyi | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/stubs/python-dateutil/dateutil/relativedelta.pyi b/stubs/python-dateutil/dateutil/relativedelta.pyi index e8f2528a9ac6..5d0caa132580 100644 --- a/stubs/python-dateutil/dateutil/relativedelta.pyi +++ b/stubs/python-dateutil/dateutil/relativedelta.pyi @@ -42,13 +42,13 @@ class relativedelta: dt2: date | None = None, years: int = 0, months: int = 0, - days: int = 0, + days: float = 0, leapdays: int = 0, - weeks: int = 0, - hours: int = 0, - minutes: int = 0, - seconds: int = 0, - microseconds: int = 0, + weeks: float = 0, + hours: float = 0, + minutes: float = 0, + seconds: float = 0, + microseconds: float = 0, year: int | None = None, month: int | None = None, day: int | None = None,