python-dateutil: respect inheritance on relativedelta.__rsub__ (#11462) (#11463)

This commit is contained in:
Maico Timmerman
2024-03-15 17:06:54 +01:00
committed by GitHub
parent a20f54663c
commit bd33ada0e3
2 changed files with 24 additions and 2 deletions

View File

@@ -1,11 +1,11 @@
from datetime import date, datetime, timedelta
from datetime import date, timedelta
from typing import SupportsFloat, TypeVar, overload
from typing_extensions import Self, TypeAlias
# See #9817 for why we reexport this here
from ._common import weekday as weekday
_DateT = TypeVar("_DateT", date, datetime)
_DateT = TypeVar("_DateT", bound=date)
# Work around attribute and type having the same name.
_Weekday: TypeAlias = weekday