massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stubs / python-dateutil / dateutil / relativedelta.pyi
1 from datetime import date, datetime, timedelta
2 from typing import SupportsFloat, TypeVar, overload
3
4 from ._common import weekday
5
6 _SelfT = TypeVar("_SelfT", bound=relativedelta)
7 _DateT = TypeVar("_DateT", date, datetime)
8 # Work around attribute and type having the same name.
9 _weekday = weekday
10
11 MO: weekday
12 TU: weekday
13 WE: weekday
14 TH: weekday
15 FR: weekday
16 SA: weekday
17 SU: weekday
18
19 class relativedelta(object):
20     years: int
21     months: int
22     days: int
23     leapdays: int
24     hours: int
25     minutes: int
26     seconds: int
27     microseconds: int
28     year: int | None
29     month: int | None
30     weekday: _weekday | None
31     day: int | None
32     hour: int | None
33     minute: int | None
34     second: int | None
35     microsecond: int | None
36     def __init__(
37         self,
38         dt1: date | None = ...,
39         dt2: date | None = ...,
40         years: int | None = ...,
41         months: int | None = ...,
42         days: int | None = ...,
43         leapdays: int | None = ...,
44         weeks: int | None = ...,
45         hours: int | None = ...,
46         minutes: int | None = ...,
47         seconds: int | None = ...,
48         microseconds: int | None = ...,
49         year: int | None = ...,
50         month: int | None = ...,
51         day: int | None = ...,
52         weekday: int | _weekday | None = ...,
53         yearday: int | None = ...,
54         nlyearday: int | None = ...,
55         hour: int | None = ...,
56         minute: int | None = ...,
57         second: int | None = ...,
58         microsecond: int | None = ...,
59     ) -> None: ...
60     @property
61     def weeks(self) -> int: ...
62     @weeks.setter
63     def weeks(self, value: int) -> None: ...
64     def normalized(self: _SelfT) -> _SelfT: ...
65     # TODO: use Union when mypy will handle it properly in overloaded operator
66     # methods (#2129, #1442, #1264 in mypy)
67     @overload
68     def __add__(self: _SelfT, other: relativedelta) -> _SelfT: ...
69     @overload
70     def __add__(self: _SelfT, other: timedelta) -> _SelfT: ...
71     @overload
72     def __add__(self, other: _DateT) -> _DateT: ...
73     @overload
74     def __radd__(self: _SelfT, other: relativedelta) -> _SelfT: ...
75     @overload
76     def __radd__(self: _SelfT, other: timedelta) -> _SelfT: ...
77     @overload
78     def __radd__(self, other: _DateT) -> _DateT: ...
79     @overload
80     def __rsub__(self: _SelfT, other: relativedelta) -> _SelfT: ...
81     @overload
82     def __rsub__(self: _SelfT, other: timedelta) -> _SelfT: ...
83     @overload
84     def __rsub__(self, other: _DateT) -> _DateT: ...
85     def __sub__(self: _SelfT, other: relativedelta) -> _SelfT: ...
86     def __neg__(self: _SelfT) -> _SelfT: ...
87     def __bool__(self) -> bool: ...
88     def __nonzero__(self) -> bool: ...
89     def __mul__(self: _SelfT, other: SupportsFloat) -> _SelfT: ...
90     def __rmul__(self: _SelfT, other: SupportsFloat) -> _SelfT: ...
91     def __eq__(self, other: object) -> bool: ...
92     def __ne__(self, other: object) -> bool: ...
93     def __div__(self: _SelfT, other: SupportsFloat) -> _SelfT: ...
94     def __truediv__(self: _SelfT, other: SupportsFloat) -> _SelfT: ...
95     def __repr__(self) -> str: ...
96     def __abs__(self: _SelfT) -> _SelfT: ...
97     def __hash__(self) -> int: ...