Skip to content

Commit 8036bbd

Browse files
marshal: improve bytes handling (#9047)
Co-authored-by: Jelle Zijlstra <[email protected]>
1 parent 3d8d744 commit 8036bbd

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

stdlib/marshal.pyi

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
from typing import IO, Any
1+
from _typeshed import ReadableBuffer, SupportsRead, SupportsWrite
2+
from typing import Any
23

34
version: int
45

5-
def dump(__value: Any, __file: IO[Any], __version: int = ...) -> None: ...
6-
def load(__file: IO[Any]) -> Any: ...
6+
def dump(__value: Any, __file: SupportsWrite[bytes], __version: int = ...) -> None: ...
7+
def load(__file: SupportsRead[bytes]) -> Any: ...
78
def dumps(__value: Any, __version: int = ...) -> bytes: ...
8-
def loads(__bytes: bytes) -> Any: ...
9+
def loads(__bytes: ReadableBuffer) -> Any: ...

0 commit comments

Comments
 (0)