mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-06 20:24:30 +08:00
committed by
Sebastian Rittau
parent
a06abc5dff
commit
fda384fe0a
@@ -72,8 +72,10 @@ class date:
|
||||
def __gt__(self, other: date) -> bool: ...
|
||||
if sys.version_info >= (3, 8):
|
||||
def __add__(self: _S, other: timedelta) -> _S: ...
|
||||
def __radd__(self: _S, other: timedelta) -> _S: ...
|
||||
else:
|
||||
def __add__(self, other: timedelta) -> date: ...
|
||||
def __radd__(self, other: timedelta) -> date: ...
|
||||
@overload
|
||||
def __sub__(self, other: timedelta) -> date: ...
|
||||
@overload
|
||||
@@ -299,8 +301,10 @@ class datetime(date):
|
||||
def __gt__(self, other: datetime) -> bool: ... # type: ignore
|
||||
if sys.version_info >= (3, 8):
|
||||
def __add__(self: _S, other: timedelta) -> _S: ...
|
||||
def __radd__(self: _S, other: timedelta) -> _S: ...
|
||||
else:
|
||||
def __add__(self, other: timedelta) -> datetime: ...
|
||||
def __radd__(self, other: timedelta) -> datetime: ...
|
||||
@overload # type: ignore
|
||||
def __sub__(self, other: datetime) -> timedelta: ...
|
||||
@overload
|
||||
|
||||
Reference in New Issue
Block a user