Open
Description
CPython docs explain about Pickler.reduce_override
:
https://docs.python.org/3/library/pickle.html#custom-reduction-for-types-functions-and-other-objects
it is possible to subclass from the Pickler class and implement a reducer_override() method.
And a code example is provided:
...
import pickle
...
class MyPickler(pickle.Pickler):
def reducer_override(self, obj):
"""Custom reducer for MyClass."""
...
However, my code that does that now fails with pyright 1.1.393:
error: Method "reducer_override" overrides class "Pickler" in an incompatible manner
Positional parameter count mismatch; base method has 1, but override has 2 (reportIncompatibleMethodOverride)
I think it's because of this definition in typeshed:
Line 63 in c193cd2