pandas-dev / pandas-stubs

Public type stubs for pandas
BSD 3-Clause "New" or "Revised" License
230 stars 123 forks source link

Fix series.map overloads #960

Closed JanEricNitschke closed 3 weeks ago

JanEricNitschke commented 2 months ago

In my last PR that handles series.map() i introduced a slight error by adding the = ... to the overload with "ignore" as this is not the actual default value.

Subsequently invalid function that do not handle pd.NA were accepted when the na_action was not explicitely specified.

This has been addressed and test cases have been added to check this.

Dr-Irv commented 3 weeks ago

@JanEricNitschke can you address my comments at

I'll then have to take another careful look and see if there is anything else that I'm not comfortable with.

JanEricNitschke commented 3 weeks ago

@Dr-Irv ah, sorry, i had other life stuff come up.

I think it is not easily possible to make the changes i intended while keeping with the general philosophy of not disallowing things with the types that do happen to work at runtime.

So i would probably close this PR for now and maybe have another look again later when i have more time to see if there is still an option?

Does that work for you?

Dr-Irv commented 3 weeks ago

So i would probably close this PR for now and maybe have another look again later when i have more time to see if there is still an option?

Does that work for you?

Sure. I'll let you do the closing