@@ -138,13 +138,11 @@ def view(self, dtype: Dtype | None = None) -> ArrayLike:
138
138
139
139
return TimedeltaArray (arr .view ("i8" ), dtype = dtype )
140
140
141
- # error: Incompatible return value type (got "ndarray", expected
142
- # "ExtensionArray")
143
141
# error: Argument "dtype" to "view" of "_ArrayOrScalarCommon" has incompatible
144
142
# type "Union[ExtensionDtype, dtype[Any]]"; expected "Union[dtype[Any], None,
145
143
# type, _SupportsDType, str, Union[Tuple[Any, int], Tuple[Any, Union[int,
146
144
# Sequence[int]]], List[Any], _DTypeDict, Tuple[Any, Any]]]"
147
- return arr .view (dtype = dtype ) # type: ignore[return-value, arg-type]
145
+ return arr .view (dtype = dtype ) # type: ignore[arg-type]
148
146
149
147
def take (
150
148
self : NDArrayBackedExtensionArrayT ,
@@ -276,13 +274,9 @@ def __getitem__(
276
274
return self ._box_func (result )
277
275
return self ._from_backing_data (result )
278
276
279
- # error: Value of type variable "AnyArrayLike" of "extract_array" cannot be
280
- # "Union[int, slice, ndarray]"
281
277
# error: Incompatible types in assignment (expression has type "ExtensionArray",
282
278
# variable has type "Union[int, slice, ndarray]")
283
- key = extract_array ( # type: ignore[type-var,assignment]
284
- key , extract_numpy = True
285
- )
279
+ key = extract_array (key , extract_numpy = True ) # type: ignore[assignment]
286
280
key = check_array_indexer (self , key )
287
281
result = self ._ndarray [key ]
288
282
if lib .is_scalar (result ):
0 commit comments