Make json.load, json.loads stubs object_hook parameter optional. (#741)

This commit is contained in:
George King
2016-12-07 16:14:49 -05:00
committed by Jukka Lehtosalo
parent 2b022d18a4
commit 085c3f9915

View File

@@ -34,7 +34,7 @@ def dump(obj: Any,
def loads(s: str,
encoding: Any = ..., # ignored and deprecated
cls: Any = ...,
object_hook: Callable[[Dict], Any] = ...,
object_hook: Optional[Callable[[Dict], Any]] = ...,
parse_float: Optional[Callable[[str], Any]] = ...,
parse_int: Optional[Callable[[str], Any]] = ...,
parse_constant: Optional[Callable[[str], Any]] = ...,
@@ -43,7 +43,7 @@ def loads(s: str,
def load(fp: IO[str],
cls: Any = ...,
object_hook: Callable[[Dict], Any] = ...,
object_hook: Optional[Callable[[Dict], Any]] = ...,
parse_float: Optional[Callable[[str], Any]] = ...,
parse_int: Optional[Callable[[str], Any]] = ...,
parse_constant: Optional[Callable[[str], Any]] = ...,