Skip to content

Commit 5535b7f

Browse files
authored
Update caldav stubs for 0.9 (#7734)
1 parent f330e12 commit 5535b7f

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

stubs/caldav/METADATA.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
version = "0.8.*"
1+
version = "0.9.*"
22
# also types-lxml and types-icalendar when those stubs are added
33
requires = ["types-requests", "types-vobject"]

stubs/caldav/caldav/davclient.pyi

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from _typeshed import Self
12
from collections.abc import Iterable, Mapping
23
from typing import Any
34
from typing_extensions import TypeAlias
@@ -46,6 +47,8 @@ class DAVClient:
4647
ssl_verify_cert: bool | str = ...,
4748
ssl_cert: str | tuple[str, str] | None = ...,
4849
) -> None: ...
50+
def __enter__(self: Self) -> Self: ...
51+
def __exit__(self, exc_type: object, exc_value: object, traceback: object) -> None: ...
4952
def principal(self, *, url: str | ParseResult | SplitResult | URL | None = ...) -> Principal: ...
5053
def calendar(
5154
self,

stubs/caldav/caldav/objects.pyi

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,11 @@ class Principal(DAVObject):
6868
class Calendar(DAVObject):
6969
def get_supported_components(self) -> list[Any]: ...
7070
def save_with_invites(self, ical: str, attendees, **attendeeoptions) -> None: ...
71-
def save_event(self, ical: str, no_overwrite: bool = ..., no_create: bool = ...) -> Event: ...
72-
def save_todo(self, ical: str, no_overwrite: bool = ..., no_create: bool = ...) -> Todo: ...
73-
def save_journal(self, ical: str, no_overwrite: bool = ..., no_create: bool = ...) -> Journal: ...
71+
def save_event(self, ical: str | None = ..., no_overwrite: bool = ..., no_create: bool = ..., **ical_data: Any) -> Event: ...
72+
def save_todo(self, ical: str | None = ..., no_overwrite: bool = ..., no_create: bool = ..., **ical_data: Any) -> Todo: ...
73+
def save_journal(
74+
self, ical: str | None = ..., no_overwrite: bool = ..., no_create: bool = ..., **ical_data: Any
75+
) -> Journal: ...
7476
add_event = save_event
7577
add_todo = save_todo
7678
add_journal = save_journal

0 commit comments

Comments
 (0)