ENH: copy keyword to set_axis by jbrockmendel · Pull Request #47932 · pandas-dev/pandas (original) (raw)

@Dr-Irv im not clear on what mypy is asking for. help?

I think the issue is as follows. In core/generic.py, you have the inplace argument on the 3rd overload typed as:

inplace: bool_t | lib.NoDefault = ...,

But in series.pyi and frame.pyi, the 3rd overload has:

inplace: bool = ...

You have to make sure the signatures are the same in the superclass and subclass for each overload, and that the declared method (without @overload) has all the possible types of each argument that are specified across all overloads.