mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-07-09 09:59:16 +08:00
python-dateutil: add overload to rrulestr (#14815)
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user