Skip to content

[WIP] Fix type annotations for Pandas.core.indexes.datetimelike #26365

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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ ignore_errors=True
[mypy-pandas.core.indexes.base]
ignore_errors=True

[mypy-pandas.core.indexes.datetimelike]
ignore_errors=True

[mypy-pandas.core.indexes.datetimes]
ignore_errors=True

Expand Down
7 changes: 4 additions & 3 deletions pandas/core/indexes/datetimelike.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Base and utility classes for tseries type pandas objects.
"""
import operator
from typing import Set
import warnings

import numpy as np
Expand Down Expand Up @@ -134,7 +135,7 @@ def values(self) -> np.ndarray:
# Note: PeriodArray overrides this to return an ndarray of objects.
return self._data._data

@property
@property # type: ignore
@Appender(DatetimeLikeArrayMixin.asi8.__doc__)
def asi8(self):
return self._data.asi8
Expand Down Expand Up @@ -758,9 +759,9 @@ class DatetimelikeDelegateMixin(PandasDelegate):
boxed in an index, after being returned from the array
"""
# raw_methods : dispatch methods that shouldn't be boxed in an Index
_raw_methods = set()
_raw_methods = set() # type: Set[str]
# raw_properties : dispatch properties that shouldn't be boxed in an Index
_raw_properties = set()
_raw_properties = set() # type: Set[str]
name = None
_data = None

Expand Down