2 from datetime import datetime
4 from typing import IO, Any, Dict as _Dict, Mapping, MutableMapping, Tuple, Type
6 class PlistFormat(Enum):
10 FMT_XML = PlistFormat.FMT_XML
11 FMT_BINARY = PlistFormat.FMT_BINARY
13 if sys.version_info >= (3, 9):
14 def load(fp: IO[bytes], *, fmt: PlistFormat | None = ..., dict_type: Type[MutableMapping[str, Any]] = ...) -> Any: ...
15 def loads(value: bytes, *, fmt: PlistFormat | None = ..., dict_type: Type[MutableMapping[str, Any]] = ...) -> Any: ...
21 fmt: PlistFormat | None = ...,
22 use_builtin_types: bool = ...,
23 dict_type: Type[MutableMapping[str, Any]] = ...,
28 fmt: PlistFormat | None = ...,
29 use_builtin_types: bool = ...,
30 dict_type: Type[MutableMapping[str, Any]] = ...,
34 value: Mapping[str, Any] | list[Any] | Tuple[Any, ...] | str | bool | float | bytes | datetime,
37 fmt: PlistFormat = ...,
38 sort_keys: bool = ...,
42 value: Mapping[str, Any] | list[Any] | Tuple[Any, ...] | str | bool | float | bytes | datetime,
44 fmt: PlistFormat = ...,
46 sort_keys: bool = ...,
49 if sys.version_info < (3, 9):
50 def readPlist(pathOrFile: str | IO[bytes]) -> Any: ...
51 def writePlist(value: Mapping[str, Any], pathOrFile: str | IO[bytes]) -> None: ...
52 def readPlistFromBytes(data: bytes) -> Any: ...
53 def writePlistToBytes(value: Mapping[str, Any]) -> bytes: ...
55 if sys.version_info < (3, 7):
56 class Dict(_Dict[str, Any]):
57 def __getattr__(self, attr: str) -> Any: ...
58 def __setattr__(self, attr: str, value: Any) -> None: ...
59 def __delattr__(self, attr: str) -> None: ...
61 if sys.version_info < (3, 9):
64 def __init__(self, data: bytes) -> None: ...
66 if sys.version_info >= (3, 8):
69 def __init__(self, data: int) -> None: ...
70 def __index__(self) -> int: ...
71 def __reduce__(self) -> Any: ...
72 def __hash__(self) -> int: ...
74 class InvalidFileException(ValueError):
75 def __init__(self, message: str = ...) -> None: ...