mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-03 10:03:32 +08:00
json.load can also take IO[bytes] in py36+ (#2188)
This commit is contained in:
committed by
Jelle Zijlstra
parent
a25ff0bddf
commit
2d4bb04ab3
@@ -41,7 +41,11 @@ def loads(s: Union[str, bytes, bytearray],
|
||||
object_pairs_hook: Optional[Callable[[List[Tuple[Any, Any]]], Any]] = ...,
|
||||
**kwds: Any) -> Any: ...
|
||||
|
||||
def load(fp: IO[str],
|
||||
if sys.version_info >= (3, 6):
|
||||
_LoadIO = IO[Any]
|
||||
else:
|
||||
_LoadIO = IO[str]
|
||||
def load(fp: _LoadIO,
|
||||
cls: Any = ...,
|
||||
object_hook: Optional[Callable[[Dict], Any]] = ...,
|
||||
parse_float: Optional[Callable[[str], Any]] = ...,
|
||||
|
||||
Reference in New Issue
Block a user