Improve some in-place BinOp methods (#7149)

This commit is contained in:
Alex Waygood
2022-02-06 23:36:57 +00:00
committed by GitHub
parent 3b8412650e
commit a62fd92fb0
5 changed files with 14 additions and 11 deletions

View File

@@ -1,4 +1,5 @@
import datetime
from _typeshed import Self
from typing import Iterable
from dateutil.relativedelta import relativedelta
@@ -19,9 +20,9 @@ class DateTimeRange:
def __eq__(self, other: object) -> bool: ...
def __ne__(self, other: object) -> bool: ...
def __add__(self, other: datetime.timedelta) -> DateTimeRange: ...
def __iadd__(self, other: datetime.timedelta) -> DateTimeRange: ...
def __iadd__(self: Self, other: datetime.timedelta) -> Self: ...
def __sub__(self, other: datetime.timedelta) -> DateTimeRange: ...
def __isub__(self, other: datetime.timedelta) -> DateTimeRange: ...
def __isub__(self: Self, other: datetime.timedelta) -> Self: ...
def __contains__(self, x: datetime.timedelta | DateTimeRange | str) -> bool: ...
@property
def start_datetime(self) -> datetime.datetime: ...