mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-10 13:32:26 +08:00
plistlib: update for py39 (#4073)
This commit is contained in:
@@ -22,29 +22,41 @@ if sys.version_info >= (3,):
|
||||
else:
|
||||
_Path = Union[str, unicode]
|
||||
|
||||
if sys.version_info >= (3, 4):
|
||||
if sys.version_info >= (3, 9):
|
||||
@overload
|
||||
def load(fp: IO[bytes], *, fmt: Optional[PlistFormat] = ...) -> DictT[str, Any]: ...
|
||||
@overload
|
||||
def load(fp: IO[bytes], *, fmt: Optional[PlistFormat] = ..., dict_type: Type[_D]) -> _D: ...
|
||||
@overload
|
||||
def loads(value: bytes, *, fmt: Optional[PlistFormat] = ...) -> DictT[str, Any]: ...
|
||||
@overload
|
||||
def loads(value: bytes, *, fmt: Optional[PlistFormat] = ..., dict_type: Type[_D]) -> _D: ...
|
||||
elif sys.version_info >= (3, 4):
|
||||
@overload
|
||||
def load(fp: IO[bytes], *, fmt: Optional[PlistFormat] = ...,
|
||||
use_builtin_types: bool = ...) -> DictT[str, Any]: ...
|
||||
@overload
|
||||
def load(fp: IO[bytes], *, fmt: Optional[PlistFormat] = ...,
|
||||
use_builtin_types: bool = ..., dict_type: Type[_D] = ...) -> _D: ...
|
||||
use_builtin_types: bool = ..., dict_type: Type[_D]) -> _D: ...
|
||||
@overload
|
||||
def loads(value: bytes, *, fmt: Optional[PlistFormat] = ...,
|
||||
use_builtin_types: bool = ...) -> DictT[str, Any]: ...
|
||||
@overload
|
||||
def loads(value: bytes, *, fmt: Optional[PlistFormat] = ...,
|
||||
use_builtin_types: bool = ..., dict_type: Type[_D] = ...) -> _D: ...
|
||||
use_builtin_types: bool = ..., dict_type: Type[_D]) -> _D: ...
|
||||
|
||||
if sys.version_info >= (3, 4):
|
||||
def dump(value: Mapping[str, Any], fp: IO[bytes], *,
|
||||
fmt: PlistFormat = ..., sort_keys: bool = ...,
|
||||
skipkeys: bool = ...) -> None: ...
|
||||
def dumps(value: Mapping[str, Any], *, fmt: PlistFormat = ...,
|
||||
skipkeys: bool = ..., sort_keys: bool = ...) -> bytes: ...
|
||||
|
||||
def readPlist(pathOrFile: Union[_Path, IO[bytes]]) -> DictT[str, Any]: ...
|
||||
def writePlist(value: Mapping[str, Any], pathOrFile: Union[_Path, IO[bytes]]) -> None: ...
|
||||
def readPlistFromBytes(data: bytes) -> DictT[str, Any]: ...
|
||||
def writePlistToBytes(value: Mapping[str, Any]) -> bytes: ...
|
||||
if sys.version_info < (3, 9):
|
||||
def readPlist(pathOrFile: Union[_Path, IO[bytes]]) -> DictT[str, Any]: ...
|
||||
def writePlist(value: Mapping[str, Any], pathOrFile: Union[_Path, IO[bytes]]) -> None: ...
|
||||
def readPlistFromBytes(data: bytes) -> DictT[str, Any]: ...
|
||||
def writePlistToBytes(value: Mapping[str, Any]) -> bytes: ...
|
||||
if sys.version_info < (3,):
|
||||
def readPlistFromResource(path: _Path, restype: str = ...,
|
||||
resid: int = ...) -> DictT[str, Any]: ...
|
||||
@@ -60,9 +72,10 @@ if sys.version_info < (3, 7):
|
||||
def __setattr__(self, attr: str, value: Any) -> None: ...
|
||||
def __delattr__(self, attr: str) -> None: ...
|
||||
|
||||
class Data:
|
||||
data: bytes
|
||||
def __init__(self, data: bytes) -> None: ...
|
||||
if sys.version_info < (3, 9):
|
||||
class Data:
|
||||
data: bytes
|
||||
def __init__(self, data: bytes) -> None: ...
|
||||
|
||||
if sys.version_info >= (3, 8):
|
||||
class UID:
|
||||
|
||||
Reference in New Issue
Block a user