File: rrule.pyi

package info (click to toggle)
typeshed 0.0~git20221107.4f381af-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 18,036 kB
  • sloc: python: 3,216; sh: 62; makefile: 13
file content (111 lines) | stat: -rw-r--r-- 3,289 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
import datetime
from collections.abc import Iterable
from typing import Any
from typing_extensions import TypeAlias

from ._common import weekday as weekdaybase

YEARLY: int
MONTHLY: int
WEEKLY: int
DAILY: int
HOURLY: int
MINUTELY: int
SECONDLY: int

class weekday(weekdaybase): ...

weekdays: tuple[weekday, weekday, weekday, weekday, weekday, weekday, weekday]
MO: weekday
TU: weekday
WE: weekday
TH: weekday
FR: weekday
SA: weekday
SU: weekday

class rrulebase:
    def __init__(self, cache: bool = ...) -> None: ...
    def __iter__(self): ...
    def __getitem__(self, item): ...
    def __contains__(self, item): ...
    def count(self): ...
    def before(self, dt, inc: bool = ...): ...
    def after(self, dt, inc: bool = ...): ...
    def xafter(self, dt, count: Any | None = ..., inc: bool = ...): ...
    def between(self, after, before, inc: bool = ..., count: int = ...): ...

class rrule(rrulebase):
    def __init__(
        self,
        freq,
        dtstart: datetime.date | None = ...,
        interval: int = ...,
        wkst: weekday | int | None = ...,
        count: int | None = ...,
        until: datetime.date | int | None = ...,
        bysetpos: int | Iterable[int] | None = ...,
        bymonth: int | Iterable[int] | None = ...,
        bymonthday: int | Iterable[int] | None = ...,
        byyearday: int | Iterable[int] | None = ...,
        byeaster: int | Iterable[int] | None = ...,
        byweekno: int | Iterable[int] | None = ...,
        byweekday: int | weekday | Iterable[int] | Iterable[weekday] | None = ...,
        byhour: int | Iterable[int] | None = ...,
        byminute: int | Iterable[int] | None = ...,
        bysecond: int | Iterable[int] | None = ...,
        cache: bool = ...,
    ) -> None: ...
    def replace(self, **kwargs): ...

class _iterinfo:
    rrule: Any = ...
    def __init__(self, rrule) -> None: ...
    yearlen: int = ...
    nextyearlen: int = ...
    yearordinal: int = ...
    yearweekday: int = ...
    mmask: Any = ...
    mdaymask: Any = ...
    nmdaymask: Any = ...
    wdaymask: Any = ...
    mrange: Any = ...
    wnomask: Any = ...
    nwdaymask: Any = ...
    eastermask: Any = ...
    lastyear: int = ...
    lastmonth: int = ...
    def rebuild(self, year, month): ...
    def ydayset(self, year, month, day): ...
    def mdayset(self, year, month, day): ...
    def wdayset(self, year, month, day): ...
    def ddayset(self, year, month, day): ...
    def htimeset(self, hour, minute, second): ...
    def mtimeset(self, hour, minute, second): ...
    def stimeset(self, hour, minute, second): ...

_RRule: TypeAlias = rrule

class rruleset(rrulebase):
    class _genitem:
        dt: Any = ...
        genlist: Any = ...
        gen: Any = ...
        def __init__(self, genlist, gen) -> None: ...
        def __next__(self): ...
        next: Any = ...
        def __lt__(self, other): ...
        def __gt__(self, other): ...
        def __eq__(self, other): ...
        def __ne__(self, other): ...

    def __init__(self, cache: bool = ...) -> None: ...
    def rrule(self, rrule: _RRule): ...
    def rdate(self, rdate): ...
    def exrule(self, exrule): ...
    def exdate(self, exdate): ...

class _rrulestr:
    def __call__(self, s, **kwargs) -> rrule | rruleset: ...

rrulestr: _rrulestr