Skip to content

Commit 2da6f30

Browse files
committed
Add type annotation and remove blacklist item
1 parent 7bd7fab commit 2da6f30

File tree

2 files changed

+33
-6
lines changed

2 files changed

+33
-6
lines changed

mypy.ini

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,37 @@ ignore_errors=True
88
[mypy-pandas.core.api]
99
ignore_errors=True
1010

11-
[mypy-pandas.core.indexes.base]
11+
[mypy-pandas.core.arrays.array_]
12+
ignore_errors=True
13+
14+
[mypy-pandas.core.arrays.datetimelik]
15+
ignore_errors=True
16+
17+
[mypy-pandas.core.arrays.integer]
18+
ignore_errors=True
19+
20+
[mypy-pandas.core.arrays.interval]
21+
ignore_errors=True
22+
23+
[mypy-pandas.core.arrays.period]
24+
ignore_errors=True
25+
26+
[mypy-pandas.core.arrays.timedeltas]
27+
ignore_errors=True
28+
29+
[mypy-pandas.core.base]
30+
ignore_errors=True
31+
32+
[mypy-pandas.core.computation.expr]
1233
ignore_errors=True
1334

14-
[mypy-pandas.core.indexes.datetimelike]
35+
[mypy-pandas.core.computation.ops]
36+
ignore_errors=True
37+
38+
[mypy-pandas.core.computation.pytables]
39+
ignore_errors=True
40+
41+
[mypy-pandas.core.indexes.base]
1542
ignore_errors=True
1643

1744
[mypy-pandas.core.indexes.datetimes]

pandas/core/indexes/datetimelike.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"""
44
import operator
55
import warnings
6+
from typing import Set
67

78
import numpy as np
89

@@ -69,7 +70,6 @@ class DatetimeIndexOpsMixin(ExtensionOpsMixin):
6970
_resolution = cache_readonly(DatetimeLikeArrayMixin._resolution.fget)
7071
resolution = cache_readonly(DatetimeLikeArrayMixin.resolution.fget)
7172

72-
_box_values = ea_passthrough(DatetimeLikeArrayMixin._box_values)
7373
_maybe_mask_results = ea_passthrough(
7474
DatetimeLikeArrayMixin._maybe_mask_results)
7575
__iter__ = ea_passthrough(DatetimeLikeArrayMixin.__iter__)
@@ -134,7 +134,7 @@ def values(self) -> np.ndarray:
134134
# Note: PeriodArray overrides this to return an ndarray of objects.
135135
return self._data._data
136136

137-
@property
137+
@property # type: ignore
138138
@Appender(DatetimeLikeArrayMixin.asi8.__doc__)
139139
def asi8(self):
140140
return self._data.asi8
@@ -758,9 +758,9 @@ class DatetimelikeDelegateMixin(PandasDelegate):
758758
boxed in an index, after being returned from the array
759759
"""
760760
# raw_methods : dispatch methods that shouldn't be boxed in an Index
761-
_raw_methods = set()
761+
_raw_methods = set() # type: Set[str]
762762
# raw_properties : dispatch properties that shouldn't be boxed in an Index
763-
_raw_properties = set()
763+
_raw_properties = set() # type: Set[str]
764764
name = None
765765
_data = None
766766

0 commit comments

Comments
 (0)