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

TYP: NumericIndex._can_hold_na #43390

Closed
twoertwein opened this issue Sep 3, 2021 · 3 comments
Closed

TYP: NumericIndex._can_hold_na #43390

twoertwein opened this issue Sep 3, 2021 · 3 comments
Labels
Typing type annotations, mypy/pyright type checking

Comments

@twoertwein
Copy link
Member

Index._can_hold_na: bool
NumericIndex._can_hold_na: property-like (cache_readonly)

bool is not a property-like object.

pandas/core/indexes/numeric.py:103: error: Signature of "_can_hold_na" incompatible with supertype "Index" [override]

@twoertwein twoertwein added Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Sep 3, 2021
@simonjayhawkins simonjayhawkins added Typing type annotations, mypy/pyright type checking and removed Needs Triage Issue that has not been reviewed by a pandas team member labels Sep 4, 2021
@simonjayhawkins simonjayhawkins added this to the Contributions Welcome milestone Sep 4, 2021
@jbrockmendel
Copy link
Member

so do we need a "type: ignore" here?

@twoertwein
Copy link
Member Author

so do we need a "type: ignore" here?

Probably yes, or the parent-class should also use cache_readonly.

I opened this and the other 3(?) issues because I wasn't familiar enough with these code portions. Looking backward, all of them can probably use a "type: ignore" at least initially.

@twoertwein
Copy link
Member Author

Should have been closed as part of #43828

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

No branches or pull requests

3 participants