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

Fix Type Annotations in pandas.core.dtypes #26028

Closed
gwrome opened this issue Apr 8, 2019 · 0 comments · Fixed by #26029
Closed

Fix Type Annotations in pandas.core.dtypes #26028

gwrome opened this issue Apr 8, 2019 · 0 comments · Fixed by #26029
Labels
Typing type annotations, mypy/pyright type checking
Milestone

Comments

@gwrome
Copy link
Contributor

gwrome commented Apr 8, 2019

Part of #25882

pandas.core.dtypes.dtypes and .missing have the following errors:

pandas/core/dtypes/dtypes.py:112: error: Need type annotation for 'shape'
pandas/core/dtypes/dtypes.py:117: error: Need type annotation for '_cache'
pandas/core/dtypes/dtypes.py:175: error: Definition of "type" in base class "PandasExtensionDtype" is incompatible with definition in base class "ExtensionDtype"
pandas/core/dtypes/dtypes.py:175: error: Definition of "kind" in base class "PandasExtensionDtype" is incompatible with definition in base class "ExtensionDtype"
pandas/core/dtypes/dtypes.py:220: error: Incompatible types in assignment (expression has type "Type[CategoricalDtypeType]", base class "PandasExtensionDtype" defined the type as "None")
pandas/core/dtypes/dtypes.py:221: error: Incompatible types in assignment (expression has type "str", base class "PandasExtensionDtype" defined the type as "None")
pandas/core/dtypes/dtypes.py:222: error: Incompatible types in assignment (expression has type "str", base class "PandasExtensionDtype" defined the type as "None")
pandas/core/dtypes/dtypes.py:224: error: Incompatible types in assignment (expression has type "Tuple[str, str]", base class "_DtypeOpsMixin" defined the type as "Tuple[]")
pandas/core/dtypes/dtypes.py:225: error: Need type annotation for '_cache'
pandas/core/dtypes/dtypes.py:577: error: Definition of "type" in base class "PandasExtensionDtype" is incompatible with definition in base class "ExtensionDtype"
pandas/core/dtypes/dtypes.py:577: error: Definition of "kind" in base class "PandasExtensionDtype" is incompatible with definition in base class "ExtensionDtype"
pandas/core/dtypes/dtypes.py:588: error: Incompatible types in assignment (expression has type "str", base class "PandasExtensionDtype" defined the type as "None")
pandas/core/dtypes/dtypes.py:589: error: Incompatible types in assignment (expression has type "str", base class "PandasExtensionDtype" defined the type as "None")
pandas/core/dtypes/dtypes.py:593: error: Incompatible types in assignment (expression has type "Tuple[str, str]", base class "_DtypeOpsMixin" defined the type as "Tuple[]")
pandas/core/dtypes/dtypes.py:595: error: Need type annotation for '_cache'
pandas/core/dtypes/dtypes.py:732: error: Definition of "kind" in base class "ExtensionDtype" is incompatible with definition in base class "PandasExtensionDtype"
pandas/core/dtypes/dtypes.py:732: error: Definition of "type" in base class "ExtensionDtype" is incompatible with definition in base class "PandasExtensionDtype"
pandas/core/dtypes/dtypes.py:740: error: Incompatible types in assignment (expression has type "str", base class "PandasExtensionDtype" defined the type as "None")
pandas/core/dtypes/dtypes.py:741: error: Incompatible types in assignment (expression has type "str", base class "PandasExtensionDtype" defined the type as "None")
pandas/core/dtypes/dtypes.py:744: error: Incompatible types in assignment (expression has type "Tuple[str]", base class "_DtypeOpsMixin" defined the type as "Tuple[]")
pandas/core/dtypes/dtypes.py:746: error: Need type annotation for '_cache'
pandas/core/dtypes/dtypes.py:855: error: Definition of "type" in base class "PandasExtensionDtype" is incompatible with definition in base class "ExtensionDtype"
pandas/core/dtypes/dtypes.py:855: error: Definition of "kind" in base class "PandasExtensionDtype" is incompatible with definition in base class "ExtensionDtype"
pandas/core/dtypes/dtypes.py:864: error: Incompatible types in assignment (expression has type "str", base class "PandasExtensionDtype" defined the type as "None")
pandas/core/dtypes/dtypes.py:867: error: Incompatible types in assignment (expression has type "Tuple[str]", base class "_DtypeOpsMixin" defined the type as "Tuple[]")
pandas/core/dtypes/dtypes.py:869: error: Need type annotation for '_cache'

pandas/core/dtypes/missing.py:6: error: Module 'pandas._libs' has no attribute 'missing'

Working on a PR to fix these.

@gwrome gwrome changed the title Fix Type Annotations in pandas.core.dtype Fix Type Annotations in pandas.core.dtypes Apr 8, 2019
@WillAyd WillAyd added the Typing type annotations, mypy/pyright type checking label Apr 9, 2019
@jreback jreback added this to the 0.25.0 milestone Apr 12, 2019
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.

3 participants