Use typing_extensions.Self instead of _typeshed.Self (#9702)

This commit is contained in:
Alex Waygood
2023-02-15 11:32:43 +01:00
committed by GitHub
parent 8cd6d81f15
commit 7180d0223b
140 changed files with 597 additions and 610 deletions

View File

@@ -1,7 +1,7 @@
import datetime
from _typeshed import Self
from collections.abc import Iterable
from typing import ClassVar
from typing_extensions import Self
from dateutil.relativedelta import relativedelta
@@ -33,9 +33,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: Self, other: datetime.timedelta) -> Self: ...
def __iadd__(self, other: datetime.timedelta) -> Self: ...
def __sub__(self, other: datetime.timedelta) -> DateTimeRange: ...
def __isub__(self: Self, other: datetime.timedelta) -> Self: ...
def __isub__(self, other: datetime.timedelta) -> Self: ...
def __contains__(self, x: datetime.timedelta | datetime.datetime | DateTimeRange | str) -> bool: ...
@property
def start_datetime(self) -> datetime.datetime: ...