mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
Make json.load, json.loads stubs object_hook parameter optional. (#741)
This commit is contained in:
committed by
Jukka Lehtosalo
parent
2b022d18a4
commit
085c3f9915
@@ -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]] = ...,
|
||||
|
||||
Reference in New Issue
Block a user