Skip to content
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

CLN: Add typing for dtype argument in codebase #38808

Closed
32 tasks done
avinashpancham opened this issue Dec 30, 2020 · 13 comments · Fixed by #39458
Closed
32 tasks done

CLN: Add typing for dtype argument in codebase #38808

avinashpancham opened this issue Dec 30, 2020 · 13 comments · Fixed by #39458
Labels
good first issue Typing type annotations, mypy/pyright type checking
Milestone

Comments

@avinashpancham
Copy link
Contributor

avinashpancham commented Dec 30, 2020

Follow up from #37546 and #38680

Add typing for the dtype argument throughout the pandas codebase. Part of the code might need an update after adding the type since the mypy type checks can fail.

In #38680 it is already done for io/sql.py, from a directory search I found that the list of files below still have untyped dtype arguments.

Would be great if people can work on a few files at a time in separate PRs and mention this issue. I will already start with the remaining files in the io directory

  • io/parsers.py
  • io/excel/_base.py
  • io/json/_json.py
  • io/pytables.py
  • core/arrays/datetimelike.py
  • core/arrays/base.py
  • core/arrays/boolean.py
  • core/arrays/categorical.py
  • core/arrays/integer.py
  • core/arrays/interval.py
  • core/arrays/masked.py
  • core/arrays/numpy_.py
  • core/arrays/period.py
  • core/arrays/sparse/array.py
  • core/arrays/string_.py
  • core/arrays/string_arrow.py
  • core/arrays/timedeltas.py
  • core/indexes/category.py
  • core/indexes/datetimes.py
  • core/indexes/interval.py
  • core/indexes/numeric.py
  • core/indexes/period.py
  • core/indexes/range.py
  • core/internals/block.py
  • core/internals/managers.py
  • core/reshape/reshape.py
  • core/strings/object_array.py
  • core/base.py
  • core/common.py
  • core/frame.py
  • core/generic.py
  • core/series.py
@avinashpancham avinashpancham added Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Dec 30, 2020
@MarcoGorelli MarcoGorelli added Typing type annotations, mypy/pyright type checking good first issue and removed Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Dec 30, 2020
@avinashpancham
Copy link
Contributor Author

Add typing for io/parsers.py, io/excel/_base.py, io/json/_json.py and io/pytables.py in 38814

Add typing for core/arrays/datetimelike.py, core/arrays/base.py, core/arrays/boolean.py, core/arrays/categorical.py and core/arrays/integer.py in 38826

@ssooffiiaannee
Copy link

I would like to work on a few files, would it be possible?

@avinashpancham
Copy link
Contributor Author

Sure, go ahead! Would propose to take a number of files (max 5 or less) and start with them. Please first mention the files here such that other people will not work on those files.

@avinashpancham
Copy link
Contributor Author

avinashpancham commented Jan 1, 2021

I will work on the remainder of files in the directory core/arrays

@avinashpancham
Copy link
Contributor Author

avinashpancham commented Jan 1, 2021

I will work on all the files in the directory core/indexes and core/strings/object_array.py

@rbpatt2019
Copy link

I just submitted an issue (#38948) and a PR (#38968) to add more complete type hints to the pandas.core.frame.dropna method. I'd be happy to tackle the pandas.core.frame module for typing the dtypes argument!

@avinashpancham
Copy link
Contributor Author

Good to hear! Once you've started, it would be great if you could reference this issue in the PR that will update core/frame.py

@tushushu
Copy link
Contributor

tushushu commented Jan 7, 2021

Hi, I would like to work on core/common.py. It seems that no one is working on that yet.

@avinashpancham
Copy link
Contributor Author

avinashpancham commented Jan 7, 2021

Thanks @tushushu, will mark that file as done.

@avinashpancham
Copy link
Contributor Author

avinashpancham commented Jan 7, 2021

Will work on the dir core/internals/* and core/reshape/* and the files core/base.py, core/generic.py and core/series.py

@zbremmer
Copy link

zbremmer commented Jan 9, 2021

Anyone working on ```
core/generic.py

@avinashpancham
Copy link
Contributor Author

Sorry @zbremmer, all the files that need to be modified according to this issue are already taken or finished. But please have a look at other issues, since there are still plenty of open issues!

@avinashpancham
Copy link
Contributor Author

@rbpatt2019 any updates on core/frame.py, else I will work on it this weekend

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Typing type annotations, mypy/pyright type checking
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants