mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
Copyreg stubs (#3387)
This commit is contained in:
committed by
Jelle Zijlstra
parent
b5b9a3959d
commit
b112c20dad
14
stdlib/2/copy_reg.pyi
Normal file
14
stdlib/2/copy_reg.pyi
Normal file
@@ -0,0 +1,14 @@
|
||||
|
||||
from typing import TypeVar, Callable, Union, Tuple, Any, Optional, SupportsInt, Hashable, List
|
||||
|
||||
|
||||
_Type = TypeVar("_Type", bound=type)
|
||||
_Reduce = Union[Tuple[Callable[..., _Type], Tuple[Any, ...]], Tuple[Callable[..., _Type], Tuple[Any, ...], Optional[Any]]]
|
||||
|
||||
__all__: List[str]
|
||||
|
||||
def pickle(ob_type: _Type, pickle_function: Callable[[_Type], Union[str, _Reduce[_Type]]], constructor_ob: Optional[Callable[[_Reduce[_Type]], _Type]] = ...) -> None: ...
|
||||
def constructor(object: Callable[[_Reduce[_Type]], _Type]) -> None: ...
|
||||
def add_extension(module: Hashable, name: Hashable, code: SupportsInt) -> None: ...
|
||||
def remove_extension(module: Hashable, name: Hashable, code: int) -> None: ...
|
||||
def clear_extension_cache() -> None: ...
|
||||
14
stdlib/3/copyreg.pyi
Normal file
14
stdlib/3/copyreg.pyi
Normal file
@@ -0,0 +1,14 @@
|
||||
|
||||
from typing import TypeVar, Callable, Union, Tuple, Any, Optional, SupportsInt, Hashable, List
|
||||
|
||||
|
||||
_Type = TypeVar("_Type", bound=type)
|
||||
_Reduce = Union[Tuple[Callable[..., _Type], Tuple[Any, ...]], Tuple[Callable[..., _Type], Tuple[Any, ...], Optional[Any]]]
|
||||
|
||||
__all__: List[str]
|
||||
|
||||
def pickle(ob_type: _Type, pickle_function: Callable[[_Type], Union[str, _Reduce[_Type]]], constructor_ob: Optional[Callable[[_Reduce[_Type]], _Type]] = ...) -> None: ...
|
||||
def constructor(object: Callable[[_Reduce[_Type]], _Type]) -> None: ...
|
||||
def add_extension(module: Hashable, name: Hashable, code: SupportsInt) -> None: ...
|
||||
def remove_extension(module: Hashable, name: Hashable, code: int) -> None: ...
|
||||
def clear_extension_cache() -> None: ...
|
||||
Reference in New Issue
Block a user