Skip to content

TYP tighten any return type #44802

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

Closed
MarcoGorelli opened this issue Dec 7, 2021 · 4 comments · Fixed by #46638
Closed

TYP tighten any return type #44802

MarcoGorelli opened this issue Dec 7, 2021 · 4 comments · Fixed by #46638
Assignees
Labels
Typing type annotations, mypy/pyright type checking
Milestone

Comments

@MarcoGorelli
Copy link
Member

MarcoGorelli commented Dec 7, 2021

Currently, any returns Series | bool.

However, for DataFrame.any the return type should be Series, and for Series.any the return type should be bool.

Marking as good first issue, but please only attempt this if you already have some experience with Python typing and mypy.

@MarcoGorelli MarcoGorelli added good first issue Typing type annotations, mypy/pyright type checking labels Dec 7, 2021
@sglambert
Copy link

Hi @MarcoGorelli I've always wanted to contribute to Pandas. Would I be able to be assigned this issue? Cheers

@MarcoGorelli
Copy link
Member Author

If you're familiar with mypy, sure, I'll assign you

@yadav-sachin
Copy link
Contributor

@sglambert
I want to take this issue. I have implemented some ideas.
Are you still working on it?

@MarcoGorelli
Copy link
Member Author

@yadav-sachin I think you're OK to take this on if you want

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 a pull request may close this issue.

4 participants