Skip to content

Assorted Typing Fixups in pandas.core.reshape #25934

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
WillAyd opened this issue Mar 31, 2019 · 1 comment · Fixed by #25936
Closed

Assorted Typing Fixups in pandas.core.reshape #25934

WillAyd opened this issue Mar 31, 2019 · 1 comment · Fixed by #25936
Labels
good first issue Typing type annotations, mypy/pyright type checking

Comments

@WillAyd
Copy link
Member

WillAyd commented Mar 31, 2019

The tile, merge and concat modules could all be removed from the mypy.ini blacklist if we switch them over to absolute imports per the discussion in #25923

Here's the complete list of errors:

pandas/core/reshape/tile.py:16: error: Module 'pandas' has no attribute 'Categorical'
pandas/core/reshape/tile.py:16: error: Module 'pandas' has no attribute 'Index'
pandas/core/reshape/tile.py:16: error: Module 'pandas' has no attribute 'Interval'
pandas/core/reshape/tile.py:16: error: Module 'pandas' has no attribute 'IntervalIndex'
pandas/core/reshape/tile.py:16: error: Module 'pandas' has no attribute 'Series'
pandas/core/reshape/tile.py:16: error: Module 'pandas' has no attribute 'Timedelta'
pandas/core/reshape/tile.py:16: error: Module 'pandas' has no attribute 'Timestamp'
pandas/core/reshape/tile.py:16: error: Module 'pandas' has no attribute 'to_datetime'
pandas/core/reshape/tile.py:16: error: Module 'pandas' has no attribute 'to_timedelta'
pandas/core/reshape/merge.py:11: error: Module 'pandas._libs' has no attribute 'join'
pandas/core/reshape/merge.py:25: error: Module 'pandas' has no attribute 'Categorical'
pandas/core/reshape/merge.py:25: error: Module 'pandas' has no attribute 'DataFrame'
pandas/core/reshape/merge.py:25: error: Module 'pandas' has no attribute 'Index'
pandas/core/reshape/merge.py:25: error: Module 'pandas' has no attribute 'MultiIndex'
pandas/core/reshape/merge.py:25: error: Module 'pandas' has no attribute 'Series'
pandas/core/reshape/merge.py:25: error: Module 'pandas' has no attribute 'Timedelta'
pandas/core/reshape/concat.py:9: error: Module 'pandas' has no attribute 'DataFrame'
pandas/core/reshape/concat.py:9: error: Module 'pandas' has no attribute 'Index'
pandas/core/reshape/concat.py:9: error: Module 'pandas' has no attribute 'MultiIndex'
pandas/core/reshape/concat.py:9: error: Module 'pandas' has no attribute 'Series'

I'm not 100% sure about the import from pandas._libs so that may be an exception here, but would certainly take a PR for the other two modules at the very least

@WillAyd WillAyd added good first issue Typing type annotations, mypy/pyright type checking labels Mar 31, 2019
@WillAyd WillAyd added this to the Contributions Welcome milestone Mar 31, 2019
@ryankarlos
Copy link
Contributor

ryankarlos commented Mar 31, 2019

I'll work on this and #25933

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.

2 participants