Open ikokostya opened 3 years ago
you almost certainly need to run on master with mypy ; we don't have much in 1.2.x
I have the same problem with master branch.
Thanks for looking into this @ikokostya, investigations welcome to fix! (if I run this on master, I'm seeing an inferred type of Any
, so no error, but regardless typing Series.__eq__
to return a Series
would be great)
not sure how well mypy does with dynamically generated methods, but the place these methods are defined is in core.ops.__init__
, so I think annotate flex_method_SERIES's flex_wrapper
[x] I have checked that this issue has not already been reported.
[x] I have confirmed this bug exists on the latest version of pandas.
[x] (optional) I have confirmed this bug exists on the master branch of pandas.
Note: Please read this guide detailing how to provide the necessary information for us to reproduce your bug.
Code Sample, a copy-pastable example
Problem description
mypy
returns the following error:But actual type of the result at runtime is
Series
:Expected Output
No compile errors.
Output of
pd.show_versions()