mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-06 21:43:59 +08:00
[pickle] Fix _Pickle.reducer_override annotation (#13545)
This commit is contained in:
+4
-1
@@ -61,7 +61,6 @@ class PicklerMemoProxy:
|
||||
class Pickler:
|
||||
fast: bool
|
||||
dispatch_table: Mapping[type, Callable[[Any], _ReducedType]]
|
||||
reducer_override: Callable[[Any], Any]
|
||||
bin: bool # undocumented
|
||||
def __init__(
|
||||
self,
|
||||
@@ -79,6 +78,10 @@ class Pickler:
|
||||
|
||||
# this method has no default implementation for Python < 3.13
|
||||
def persistent_id(self, obj: Any, /) -> Any: ...
|
||||
# The following method is not defined on _Pickler, but can be defined on
|
||||
# sub-classes. Should return `NotImplemented` if pickling the supplied
|
||||
# object is not supported and returns the same types as `__reduce__()`.
|
||||
def reducer_override(self, obj: object, /) -> _ReducedType: ...
|
||||
|
||||
@type_check_only
|
||||
class UnpicklerMemoProxy:
|
||||
|
||||
Reference in New Issue
Block a user