Skip to content

TYP: Add typing.overload signatures to DataFrame/Series.interpolate #54999

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 4, 2023

Conversation

caneff
Copy link
Contributor

@caneff caneff commented Sep 4, 2023

This adds overloads so that a type checker can determine whether interpolate returns DataFrame/Series or None based on the value of the inplace argument.

This is more of the same thing that was done in this pull.

This will help our type checker work better and is a plain improvement to the type hints.
@caneff
Copy link
Contributor Author

caneff commented Sep 4, 2023

pre-commit.ci autofix

@twoertwein twoertwein added the Typing type annotations, mypy/pyright type checking label Sep 4, 2023
@twoertwein twoertwein merged commit 982d619 into pandas-dev:main Sep 4, 2023
@twoertwein
Copy link
Member

Thank you @caneff!

Pyright/mypy pass, CI failures seem unrelated.

mroeschke pushed a commit to mroeschke/pandas that referenced this pull request Sep 11, 2023
…andas-dev#54999)

* Add inplace overloads for  interpolate

This will help our type checker work better and is a plain improvement to the type hints.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Typing type annotations, mypy/pyright type checking
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants