@@ -90,15 +90,21 @@ class DatetimeIndexOpsMixin(ExtensionOpsMixin, _Base):
90
90
# properties there. They can be made into cache_readonly for Index
91
91
# subclasses bc they are immutable
92
92
inferred_freq = cache_readonly (
93
- DatetimeLikeArrayMixin .inferred_freq .fget # type: ignore
93
+ DatetimeLikeArrayMixin .inferred_freq .fget # type: ignore[attr-defined]
94
+ )
95
+ _isnan = cache_readonly (
96
+ DatetimeLikeArrayMixin ._isnan .fget # type: ignore[attr-defined]
97
+ )
98
+ hasnans = cache_readonly (
99
+ DatetimeLikeArrayMixin ._hasnans .fget # type: ignore[attr-defined]
94
100
)
95
- _isnan = cache_readonly (DatetimeLikeArrayMixin ._isnan .fget ) # type: ignore
96
- hasnans = cache_readonly (DatetimeLikeArrayMixin ._hasnans .fget ) # type: ignore
97
101
_hasnans = hasnans # for index / array -agnostic code
98
102
_resolution = cache_readonly (
99
- DatetimeLikeArrayMixin ._resolution .fget # type: ignore
103
+ DatetimeLikeArrayMixin ._resolution .fget # type: ignore[attr-defined]
104
+ )
105
+ resolution = cache_readonly (
106
+ DatetimeLikeArrayMixin .resolution .fget # type: ignore[attr-defined]
100
107
)
101
- resolution = cache_readonly (DatetimeLikeArrayMixin .resolution .fget ) # type: ignore
102
108
103
109
_maybe_mask_results = ea_passthrough (DatetimeLikeArrayMixin ._maybe_mask_results )
104
110
__iter__ = ea_passthrough (DatetimeLikeArrayMixin .__iter__ )
@@ -165,7 +171,9 @@ def values(self):
165
171
# Note: PeriodArray overrides this to return an ndarray of objects.
166
172
return self ._data ._data
167
173
168
- @property # type: ignore # https://github.com/python/mypy/issues/1362
174
+ # https://github.com/python/mypy/issues/1362
175
+ # error: Decorated property not supported [misc]
176
+ @property # type: ignore[misc]
169
177
@Appender (DatetimeLikeArrayMixin .asi8 .__doc__ )
170
178
def asi8 (self ):
171
179
return self ._data .asi8
@@ -226,7 +234,7 @@ def _join_i8_wrapper(joinf, dtype, with_indexers=True):
226
234
227
235
# https://github.com/python/mypy/issues/1006
228
236
# error: 'staticmethod' used with a non-method
229
- @staticmethod # type: ignore
237
+ @staticmethod # type: ignore[misc]
230
238
def wrapper (left , right ):
231
239
if isinstance (
232
240
left , (np .ndarray , ABCIndex , ABCSeries , DatetimeLikeArrayMixin )
0 commit comments