From 56e2e475e94b94154bf0fb35dca32f3f6a0184e4 Mon Sep 17 00:00:00 2001 From: Shantanu Date: Wed, 18 Mar 2020 02:38:19 -0700 Subject: [PATCH] plistlib: fix arg name, add exception (#3861) --- stdlib/2and3/plistlib.pyi | 7 +++++-- tests/stubtest_whitelists/py3_common.txt | 1 - 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/stdlib/2and3/plistlib.pyi b/stdlib/2and3/plistlib.pyi index dc15c5d5d..62668821b 100644 --- a/stdlib/2and3/plistlib.pyi +++ b/stdlib/2and3/plistlib.pyi @@ -30,10 +30,10 @@ if sys.version_info >= (3, 4): def load(fp: IO[bytes], *, fmt: Optional[PlistFormat] = ..., use_builtin_types: bool = ..., dict_type: Type[_D] = ...) -> _D: ... @overload - def loads(data: bytes, *, fmt: Optional[PlistFormat] = ..., + def loads(value: bytes, *, fmt: Optional[PlistFormat] = ..., use_builtin_types: bool = ...) -> DictT[str, Any]: ... @overload - def loads(data: bytes, *, fmt: Optional[PlistFormat] = ..., + def loads(value: bytes, *, fmt: Optional[PlistFormat] = ..., use_builtin_types: bool = ..., dict_type: Type[_D] = ...) -> _D: ... def dump(value: Mapping[str, Any], fp: IO[bytes], *, fmt: PlistFormat = ..., sort_keys: bool = ..., @@ -71,3 +71,6 @@ if sys.version_info >= (3, 8): def __index__(self) -> int: ... def __reduce__(self) -> Any: ... def __hash__(self) -> int: ... + +class InvalidFileException(ValueError): + def __init__(self, message: str = ...) -> None: ... diff --git a/tests/stubtest_whitelists/py3_common.txt b/tests/stubtest_whitelists/py3_common.txt index 24750488d..10292e8d6 100644 --- a/tests/stubtest_whitelists/py3_common.txt +++ b/tests/stubtest_whitelists/py3_common.txt @@ -582,7 +582,6 @@ pickle.Unpickler.find_class pickle.Unpickler.persistent_load pipes.Template.copy pkgutil.ImpImporter.__init__ -plistlib.loads poplib.POP3_SSL.stls posix.EX_NOTFOUND posix.sched_param._asdict