mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-31 00:24:24 +08:00
committed by
Guido van Rossum
parent
8dc082dce5
commit
1350d7e4d2
45
third_party/2/dateutil/relativedelta.pyi
vendored
45
third_party/2/dateutil/relativedelta.pyi
vendored
@@ -1,8 +1,11 @@
|
||||
from typing import Any, List, Optional, Union
|
||||
from typing import overload, Any, List, Optional, SupportsFloat, TypeVar, Union
|
||||
from datetime import date, datetime, timedelta
|
||||
|
||||
__all__ = ... # type: List[str]
|
||||
|
||||
_SelfT = TypeVar('_SelfT', bound=relativedelta)
|
||||
_DateT = TypeVar('_DateT', date, datetime)
|
||||
|
||||
|
||||
class weekday(object):
|
||||
def __init__(self, weekday: int, n: Optional[int]=...) -> None: ...
|
||||
@@ -49,38 +52,40 @@ class relativedelta(object):
|
||||
@weeks.setter
|
||||
def weeks(self, value: int) -> None: ...
|
||||
|
||||
def normalized(self) -> 'relativedelta': ...
|
||||
def normalized(self: _SelfT) -> _SelfT: ...
|
||||
|
||||
def __add__(
|
||||
self,
|
||||
other: Union['relativedelta', timedelta, date, datetime]) -> 'relativedelta': ...
|
||||
@overload
|
||||
def __add__(self: _SelfT, other: relativedelta) -> _SelfT: ...
|
||||
@overload
|
||||
def __add__(self: _SelfT, other: timedelta) -> _SelfT: ...
|
||||
@overload
|
||||
def __add__(self, other: _DateT) -> _DateT: ...
|
||||
@overload
|
||||
def __radd__(self: _SelfT, other: timedelta) -> _SelfT: ...
|
||||
@overload
|
||||
def __radd__(self, other: _DateT) -> _DateT: ...
|
||||
@overload
|
||||
def __rsub__(self: _SelfT, other: timedelta) -> _SelfT: ...
|
||||
@overload
|
||||
def __rsub__(self, other: _DateT) -> _DateT: ...
|
||||
def __sub__(self: _SelfT, other: relativedelta) -> _SelfT: ...
|
||||
|
||||
def __radd__(
|
||||
self,
|
||||
other: Any) -> 'relativedelta': ...
|
||||
|
||||
def __rsub__(
|
||||
self,
|
||||
other: Any) -> 'relativedelta': ...
|
||||
|
||||
def __sub__(self, other: 'relativedelta') -> 'relativedelta': ...
|
||||
|
||||
def __neg__(self) -> 'relativedelta': ...
|
||||
def __neg__(self: _SelfT) -> _SelfT: ...
|
||||
|
||||
def __bool__(self) -> bool: ...
|
||||
|
||||
def __nonzero__(self) -> bool: ...
|
||||
|
||||
def __mul__(self, other: float) -> 'relativedelta': ...
|
||||
def __mul__(self: _SelfT, other: SupportsFloat) -> _SelfT: ...
|
||||
|
||||
def __rmul__(self, other: float) -> 'relativedelta': ...
|
||||
def __rmul__(self: _SelfT, other: SupportsFloat) -> _SelfT: ...
|
||||
|
||||
def __eq__(self, other) -> bool: ...
|
||||
|
||||
def __ne__(self, other: object) -> bool: ...
|
||||
|
||||
def __div__(self, other: float) -> 'relativedelta': ...
|
||||
def __div__(self: _SelfT, other: SupportsFloat) -> _SelfT: ...
|
||||
|
||||
def __truediv__(self, other: float) -> 'relativedelta': ...
|
||||
def __truediv__(self: _SelfT, other: SupportsFloat) -> _SelfT: ...
|
||||
|
||||
def __repr__(self) -> str: ...
|
||||
|
||||
Reference in New Issue
Block a user