mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 21:14:48 +08:00
Switch to PEP-604 syntax in python2 stubs (#5915)
Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>
This commit is contained in:
@@ -3,8 +3,8 @@ from typing import IO, Any, Callable, Iterator, Optional, Tuple, Type, Union
|
||||
HIGHEST_PROTOCOL: int
|
||||
bytes_types: Tuple[Type[Any], ...] # undocumented
|
||||
|
||||
def dump(obj: Any, file: IO[bytes], protocol: Optional[int] = ...) -> None: ...
|
||||
def dumps(obj: Any, protocol: Optional[int] = ...) -> bytes: ...
|
||||
def dump(obj: Any, file: IO[bytes], protocol: int | None = ...) -> None: ...
|
||||
def dumps(obj: Any, protocol: int | None = ...) -> bytes: ...
|
||||
def load(file: IO[bytes]) -> Any: ...
|
||||
def loads(string: bytes) -> Any: ...
|
||||
|
||||
@@ -22,7 +22,7 @@ _reducedtype = Union[
|
||||
|
||||
class Pickler:
|
||||
fast: bool
|
||||
def __init__(self, file: IO[bytes], protocol: Optional[int] = ...) -> None: ...
|
||||
def __init__(self, file: IO[bytes], protocol: int | None = ...) -> None: ...
|
||||
def dump(self, __obj: Any) -> None: ...
|
||||
def clear_memo(self) -> None: ...
|
||||
def persistent_id(self, obj: Any) -> Any: ...
|
||||
|
||||
Reference in New Issue
Block a user