@@ -138,13 +138,11 @@ def view(self, dtype: Dtype | None = None) -> ArrayLike:
138138
139139 return TimedeltaArray (arr .view ("i8" ), dtype = dtype )
140140
141- # error: Incompatible return value type (got "ndarray", expected
142- # "ExtensionArray")
143141 # error: Argument "dtype" to "view" of "_ArrayOrScalarCommon" has incompatible
144142 # type "Union[ExtensionDtype, dtype[Any]]"; expected "Union[dtype[Any], None,
145143 # type, _SupportsDType, str, Union[Tuple[Any, int], Tuple[Any, Union[int,
146144 # 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]
148146
149147 def take (
150148 self : NDArrayBackedExtensionArrayT ,
@@ -276,13 +274,9 @@ def __getitem__(
276274 return self ._box_func (result )
277275 return self ._from_backing_data (result )
278276
279- # error: Value of type variable "AnyArrayLike" of "extract_array" cannot be
280- # "Union[int, slice, ndarray]"
281277 # error: Incompatible types in assignment (expression has type "ExtensionArray",
282278 # 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]
286280 key = check_array_indexer (self , key )
287281 result = self ._ndarray [key ]
288282 if lib .is_scalar (result ):
0 commit comments