python-dateutil: add overload to rrulestr (#14815)

This commit is contained in:
lev-blit
2025-10-07 13:25:47 +03:00
committed by GitHub
parent a02656a556
commit d6e5369c9f
2 changed files with 43 additions and 1 deletions
+30 -1
View File
@@ -1,7 +1,7 @@
import datetime
from _typeshed import Incomplete
from collections.abc import Generator, Iterable, Iterator, Sequence
from typing import Final, Literal
from typing import Final, Literal, overload
from typing_extensions import Self, TypeAlias
from ._common import weekday as weekdaybase
@@ -174,6 +174,35 @@ class rruleset(rrulebase):
def exdate(self, exdate) -> None: ...
class _rrulestr:
@overload
def __call__(
self,
s: str,
*,
forceset: Literal[True],
dtstart: datetime.date | None = None,
cache: bool | None = None,
unfold: bool = False,
compatible: bool = False,
ignoretz: bool = False,
tzids=None,
tzinfos=None,
) -> rruleset: ...
@overload
def __call__(
self,
s: str,
*,
compatible: Literal[True],
dtstart: datetime.date | None = None,
cache: bool | None = None,
unfold: bool = False,
forceset: bool = False,
ignoretz: bool = False,
tzids=None,
tzinfos=None,
) -> rruleset: ...
@overload
def __call__(
self,
s: str,