Skip to content

TYP: return values in core/*.py #47587

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 14 commits into from
Jul 6, 2022
Merged

TYP: return values in core/*.py #47587

merged 14 commits into from
Jul 6, 2022

Conversation

twoertwein
Copy link
Member

This PR is quite a bit larger since many functions needed overloads.

inplace: Literal[False] = ...,
axis=...,
level=...,
errors: IgnoreRaise | lib.NoDefault = ...,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

errors is not used in NDFrame/Series/DataFrame.where (and also in mask, which just calls where). Does errors need to go through a depreciation cycle, or can it simply be removed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in either way, I will address it in a follow-up PR

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would probably need a deprecation cycle to be safe

@mroeschke mroeschke added the Typing type annotations, mypy/pyright type checking label Jul 6, 2022
@mroeschke mroeschke added this to the 1.5 milestone Jul 6, 2022
@mroeschke mroeschke merged commit 9612375 into pandas-dev:main Jul 6, 2022
@mroeschke
Copy link
Member

Thanks @twoertwein

yehoshuadimarsky pushed a commit to yehoshuadimarsky/pandas that referenced this pull request Jul 13, 2022
* TYP: return values in core/*.py

* fix test

* to_html

* to_html part 2

* DataFrame.query

* more overloads

* fix query?

* increase stacklevel by one

* fix rename_axis

* and an overload for DataFrame.eval

* address comments

* fix typevar
@twoertwein twoertwein deleted the core_return branch September 21, 2022 15:28
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.

4 participants