11import datetime
22from _typeshed import Incomplete
33from collections .abc import Iterable , Iterator , Mapping , Sequence
4- from typing import Any , TypeVar , overload
4+ from typing import TypeVar , overload
55from typing_extensions import Literal , Self , TypeAlias
66from urllib .parse import ParseResult , SplitResult
77
@@ -14,30 +14,30 @@ from .lib.url import URL
1414_CC = TypeVar ("_CC" , bound = CalendarObjectResource )
1515# Actually "type[Todo] | type[Event] | type[Journal]", but mypy doesn't like that.
1616_CompClass : TypeAlias = type [CalendarObjectResource ]
17- _VCalAddress : TypeAlias = Any # actually icalendar.vCalAddress
17+ _VCalAddress : TypeAlias = Incomplete # actually icalendar.vCalAddress
1818
1919class DAVObject :
2020 id : str | None
2121 url : URL | None
2222 client : DAVClient | None
2323 parent : DAVObject | None
2424 name : str | None
25- props : Mapping [Any , Any ]
26- extra_init_options : dict [str , Any ]
25+ props : Mapping [Incomplete , Incomplete ]
26+ extra_init_options : dict [str , Incomplete ]
2727 def __init__ (
2828 self ,
2929 client : DAVClient | None = ...,
3030 url : str | ParseResult | SplitResult | URL | None = ...,
3131 parent : DAVObject | None = ...,
3232 name : str | None = ...,
3333 id : str | None = ...,
34- props : Mapping [Any , Any ] | None = ...,
35- ** extra : Any ,
34+ props : Mapping [Incomplete , Incomplete ] | None = ...,
35+ ** extra : Incomplete ,
3636 ) -> None : ...
3737 @property
3838 def canonical_url (self ) -> str : ...
39- def children (self , type : str | None = ...) -> list [tuple [URL , Any , Any ]]: ...
40- def get_property (self , prop , use_cached : bool = ..., ** passthrough ) -> Any | None : ...
39+ def children (self , type : str | None = ...) -> list [tuple [URL , Incomplete , Incomplete ]]: ...
40+ def get_property (self , prop , use_cached : bool = ..., ** passthrough ) -> Incomplete | None : ...
4141 def get_properties (
4242 self , props : Incomplete | None = ..., depth : int = ..., parse_response_xml : bool = ..., parse_props : bool = ...
4343 ): ...
@@ -58,7 +58,7 @@ class Principal(DAVObject):
5858 def make_calendar (
5959 self , name : str | None = ..., cal_id : str | None = ..., supported_calendar_component_set : Incomplete | None = ...
6060 ) -> Calendar : ...
61- def calendar (self , name : str | None = ... , cal_id : str | None = ... ) -> Calendar : ...
61+ def calendar (self , name : str | None = None , cal_id : str | None = None , cal_url : str | None = None ) -> Calendar : ...
6262 def get_vcal_address (self ) -> _VCalAddress : ...
6363 calendar_home_set : CalendarSet # can also be set to anything URL.objectify() accepts
6464 def freebusy_request (self , dtstart , dtend , attendees ): ...
@@ -67,12 +67,16 @@ class Principal(DAVObject):
6767 def schedule_outbox (self ) -> ScheduleOutbox : ...
6868
6969class Calendar (DAVObject ):
70- def get_supported_components (self ) -> list [Any ]: ...
70+ def get_supported_components (self ) -> list [Incomplete ]: ...
7171 def save_with_invites (self , ical : str , attendees , ** attendeeoptions ) -> None : ...
72- def save_event (self , ical : str | None = ..., no_overwrite : bool = ..., no_create : bool = ..., ** ical_data : Any ) -> Event : ...
73- def save_todo (self , ical : str | None = ..., no_overwrite : bool = ..., no_create : bool = ..., ** ical_data : Any ) -> Todo : ...
72+ def save_event (
73+ self , ical : str | None = ..., no_overwrite : bool = ..., no_create : bool = ..., ** ical_data : Incomplete
74+ ) -> Event : ...
75+ def save_todo (
76+ self , ical : str | None = ..., no_overwrite : bool = ..., no_create : bool = ..., ** ical_data : Incomplete
77+ ) -> Todo : ...
7478 def save_journal (
75- self , ical : str | None = ..., no_overwrite : bool = ..., no_create : bool = ..., ** ical_data : Any
79+ self , ical : str | None = ..., no_overwrite : bool = ..., no_create : bool = ..., ** ical_data : Incomplete
7680 ) -> Journal : ...
7781 add_event = save_event
7882 add_todo = save_todo
@@ -192,10 +196,10 @@ class ScheduleOutbox(ScheduleMailbox):
192196
193197class SynchronizableCalendarObjectCollection :
194198 def __init__ (self , calendar , objects , sync_token ) -> None : ...
195- def __iter__ (self ) -> Iterator [Any ]: ...
199+ def __iter__ (self ) -> Iterator [Incomplete ]: ...
196200 def __len__ (self ) -> int : ...
197201 def objects_by_url (self ): ...
198- def sync (self ) -> tuple [Any , Any ]: ...
202+ def sync (self ) -> tuple [Incomplete , Incomplete ]: ...
199203
200204class CalendarObjectResource (DAVObject ):
201205 def __init__ (
@@ -216,7 +220,7 @@ class CalendarObjectResource(DAVObject):
216220 def decline_invite (self , calendar : Incomplete | None = ...) -> None : ...
217221 def tentatively_accept_invite (self , calendar : Incomplete | None = ...) -> None : ...
218222 def copy (self , keep_uid : bool = ..., new_parent : Incomplete | None = ...) -> Self : ...
219- def load (self ) -> Self : ...
223+ def load (self , only_if_unloaded : bool = False ) -> Self : ...
220224 def change_attendee_status (self , attendee : Incomplete | None = ..., ** kwargs ) -> None : ...
221225 def save (
222226 self ,
@@ -227,9 +231,9 @@ class CalendarObjectResource(DAVObject):
227231 if_schedule_tag_match : bool = ...,
228232 ) -> Self : ...
229233 def get_duration (self ) -> datetime .timedelta : ...
230- data : Any
234+ data : Incomplete
231235 vobject_instance : VBase
232- icalendar_instance : Any
236+ icalendar_instance : Incomplete
233237 instance : VBase
234238
235239class Event (CalendarObjectResource ): ...
0 commit comments