mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-24 12:51:27 +08:00
Update caldav to 1.3.* (#10485)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
version = "1.2.*"
|
||||
version = "1.3.*"
|
||||
# also types-lxml and types-icalendar when those stubs are added
|
||||
requires = ["types-requests", "types-vobject"]
|
||||
partial_stub = true
|
||||
|
||||
@@ -20,7 +20,8 @@ class DAVResponse:
|
||||
status: int
|
||||
headers: CaseInsensitiveDict[str]
|
||||
objects: dict[str, dict[str, str]] # only defined after call to find_objects_and_props()
|
||||
def __init__(self, response: Response) -> None: ...
|
||||
huge_tree: bool
|
||||
def __init__(self, response: Response, davclient: DAVClient | None = None) -> None: ...
|
||||
@property
|
||||
def raw(self) -> str: ...
|
||||
def validate_status(self, status: str) -> None: ...
|
||||
@@ -39,6 +40,7 @@ class DAVClient:
|
||||
timeout: _Timeout | None
|
||||
ssl_verify_cert: bool | str
|
||||
ssl_cert: str | tuple[str, str] | None
|
||||
huge_tree: bool
|
||||
def __init__(
|
||||
self,
|
||||
url: str,
|
||||
@@ -50,6 +52,7 @@ class DAVClient:
|
||||
ssl_verify_cert: bool | str = True,
|
||||
ssl_cert: str | tuple[str, str] | None = None,
|
||||
headers: dict[str, str] = {},
|
||||
huge_tree: bool = False,
|
||||
) -> None: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
import datetime
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Iterable, Iterator, Mapping, Sequence
|
||||
from typing import TypeVar, overload
|
||||
from collections import defaultdict
|
||||
from collections.abc import Callable, Container, Iterable, Iterator, Mapping, Sequence
|
||||
from typing import Any, TypeVar, overload
|
||||
from typing_extensions import Literal, Self, TypeAlias
|
||||
from urllib.parse import ParseResult, SplitResult
|
||||
|
||||
from vobject.base import VBase
|
||||
|
||||
from .davclient import DAVClient
|
||||
from .elements.cdav import CalendarQuery, CompFilter, ScheduleInboxURL, ScheduleOutboxURL
|
||||
from .elements.cdav import CalendarData, CalendarQuery, CompFilter, ScheduleInboxURL, ScheduleOutboxURL
|
||||
from .lib.url import URL
|
||||
|
||||
_CC = TypeVar("_CC", bound=CalendarObjectResource)
|
||||
@@ -125,6 +126,7 @@ class Calendar(DAVObject):
|
||||
include_completed: bool = False,
|
||||
sort_keys: Sequence[str] = (),
|
||||
split_expanded: bool = True,
|
||||
props: list[CalendarData] | None = None,
|
||||
**kwargs,
|
||||
) -> list[CalendarObjectResource]: ...
|
||||
@overload
|
||||
@@ -136,6 +138,7 @@ class Calendar(DAVObject):
|
||||
include_completed: bool = False,
|
||||
sort_keys: Sequence[str] = (),
|
||||
split_expanded: bool = True,
|
||||
props: list[CalendarData] | None = None,
|
||||
**kwargs,
|
||||
) -> list[_CC]: ...
|
||||
@overload
|
||||
@@ -147,6 +150,7 @@ class Calendar(DAVObject):
|
||||
include_completed: bool = False,
|
||||
sort_keys: Sequence[str] = (),
|
||||
split_expanded: bool = True,
|
||||
props: list[CalendarData] | None = None,
|
||||
**kwargs,
|
||||
) -> list[_CC]: ...
|
||||
def build_search_xml_query(
|
||||
@@ -161,6 +165,7 @@ class Calendar(DAVObject):
|
||||
expand: bool | None = None,
|
||||
start: datetime.datetime | None = None,
|
||||
end: datetime.datetime | None = None,
|
||||
props: list[CalendarData] | None = None,
|
||||
*,
|
||||
uid=...,
|
||||
summary=...,
|
||||
@@ -168,6 +173,7 @@ class Calendar(DAVObject):
|
||||
description=...,
|
||||
location=...,
|
||||
status=...,
|
||||
**kwargs: str,
|
||||
) -> tuple[CalendarQuery, _CompClass]: ...
|
||||
def freebusy_request(self, start: datetime.datetime, end: datetime.datetime) -> FreeBusy: ...
|
||||
def todos(
|
||||
@@ -221,6 +227,13 @@ class CalendarObjectResource(DAVObject):
|
||||
def add_organizer(self) -> None: ...
|
||||
def split_expanded(self) -> list[Self]: ...
|
||||
def expand_rrule(self, start: datetime.datetime, end: datetime.datetime) -> None: ...
|
||||
def get_relatives(
|
||||
self,
|
||||
reltypes: Container[str] | None = None,
|
||||
relfilter: Callable[[Any], bool] | None = None,
|
||||
fetch_objects: bool = True,
|
||||
ignore_missing: bool = True,
|
||||
) -> defaultdict[str, set[str]]: ...
|
||||
def add_attendee(self, attendee, no_default_parameters: bool = False, **parameters) -> None: ...
|
||||
def is_invite_request(self) -> bool: ...
|
||||
def accept_invite(self, calendar: Incomplete | None = None) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user