diff --git a/stubs/caldav/METADATA.toml b/stubs/caldav/METADATA.toml index a8d20041e..cb3c0d00d 100644 --- a/stubs/caldav/METADATA.toml +++ b/stubs/caldav/METADATA.toml @@ -1,3 +1,3 @@ -version = "0.8.*" +version = "0.9.*" # also types-lxml and types-icalendar when those stubs are added requires = ["types-requests", "types-vobject"] diff --git a/stubs/caldav/caldav/davclient.pyi b/stubs/caldav/caldav/davclient.pyi index 3f86b5b08..b624060e1 100644 --- a/stubs/caldav/caldav/davclient.pyi +++ b/stubs/caldav/caldav/davclient.pyi @@ -1,3 +1,4 @@ +from _typeshed import Self from collections.abc import Iterable, Mapping from typing import Any from typing_extensions import TypeAlias @@ -46,6 +47,8 @@ class DAVClient: ssl_verify_cert: bool | str = ..., ssl_cert: str | tuple[str, str] | None = ..., ) -> None: ... + def __enter__(self: Self) -> Self: ... + def __exit__(self, exc_type: object, exc_value: object, traceback: object) -> None: ... def principal(self, *, url: str | ParseResult | SplitResult | URL | None = ...) -> Principal: ... def calendar( self, diff --git a/stubs/caldav/caldav/objects.pyi b/stubs/caldav/caldav/objects.pyi index 80a77bb76..989110dc1 100644 --- a/stubs/caldav/caldav/objects.pyi +++ b/stubs/caldav/caldav/objects.pyi @@ -68,9 +68,11 @@ class Principal(DAVObject): class Calendar(DAVObject): def get_supported_components(self) -> list[Any]: ... def save_with_invites(self, ical: str, attendees, **attendeeoptions) -> None: ... - def save_event(self, ical: str, no_overwrite: bool = ..., no_create: bool = ...) -> Event: ... - def save_todo(self, ical: str, no_overwrite: bool = ..., no_create: bool = ...) -> Todo: ... - def save_journal(self, ical: str, no_overwrite: bool = ..., no_create: bool = ...) -> Journal: ... + def save_event(self, ical: str | None = ..., no_overwrite: bool = ..., no_create: bool = ..., **ical_data: Any) -> Event: ... + def save_todo(self, ical: str | None = ..., no_overwrite: bool = ..., no_create: bool = ..., **ical_data: Any) -> Todo: ... + def save_journal( + self, ical: str | None = ..., no_overwrite: bool = ..., no_create: bool = ..., **ical_data: Any + ) -> Journal: ... add_event = save_event add_todo = save_todo add_journal = save_journal