mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-06 12:14:27 +08:00
Allow json.dump to dump to BinaryIO again (#2546)
PR #2516 aimed to widen the accepted file argument to json.dump, but since `IO` is invariant in its argument, it actually disallowed passing binary files.
This commit is contained in:
committed by
Jelle Zijlstra
parent
da6e18caf7
commit
4badd35325
@@ -20,7 +20,7 @@ def dumps(obj: Any,
|
||||
**kwds: Any) -> str: ...
|
||||
|
||||
def dump(obj: Any,
|
||||
fp: IO[Text],
|
||||
fp: Union[IO[str], IO[Text]],
|
||||
skipkeys: bool = ...,
|
||||
ensure_ascii: bool = ...,
|
||||
check_circular: bool = ...,
|
||||
|
||||
Reference in New Issue
Block a user