mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-06 20:24:30 +08:00
pickle: improve positional-arg accuracy in py39 and others (#4273)
Although technically data in loads is not positional-only in py38, but we decided that that doesn't matter Co-authored-by: hauntsaninja <>
This commit is contained in:
@@ -32,7 +32,7 @@ if sys.version_info >= (3, 8):
|
||||
errors: str = ..., buffers: Optional[Iterable[Any]] = ...
|
||||
) -> Any: ...
|
||||
def loads(
|
||||
data: bytes, *, fix_imports: bool = ..., encoding: str = ...,
|
||||
__data: bytes, *, fix_imports: bool = ..., encoding: str = ...,
|
||||
errors: str = ..., buffers: Optional[Iterable[Any]] = ...
|
||||
) -> Any: ...
|
||||
elif sys.version_info >= (3, 0):
|
||||
@@ -79,7 +79,7 @@ class Pickler:
|
||||
else:
|
||||
def __init__(self, file: IO[bytes], protocol: Optional[int] = ...) -> None: ...
|
||||
|
||||
def dump(self, obj: Any) -> None: ...
|
||||
def dump(self, __obj: Any) -> None: ...
|
||||
def clear_memo(self) -> None: ...
|
||||
def persistent_id(self, obj: Any) -> Any: ...
|
||||
|
||||
@@ -95,7 +95,7 @@ class Unpickler:
|
||||
def __init__(self, file: IO[bytes]) -> None: ...
|
||||
|
||||
def load(self) -> Any: ...
|
||||
def find_class(self, module: str, name: str) -> Any: ...
|
||||
def find_class(self, __module_name: str, __global_name: str) -> Any: ...
|
||||
if sys.version_info >= (3, 0):
|
||||
def persistent_load(self, pid: Any) -> Any: ...
|
||||
|
||||
|
||||
@@ -338,7 +338,6 @@ os._Environ.__init__
|
||||
os._Environ.setdefault
|
||||
os._wrap_close.__init__
|
||||
pickle.Pickler.persistent_id
|
||||
pickle.Unpickler.find_class
|
||||
pickle.Unpickler.persistent_load
|
||||
pipes.Template.copy
|
||||
pkgutil.ImpImporter.__init__
|
||||
|
||||
Reference in New Issue
Block a user