@@ -944,15 +944,7 @@ def __getitem__(
944944 if is_integer (key ):
945945 return self ._get_val_at (key )
946946 elif isinstance (key , tuple ):
947- # Invalid index type "Tuple[Union[int, ellipsis], ...]" for
948- # "ndarray[Any, Any]"; expected type "Union[SupportsIndex,
949- # _SupportsArray[dtype[Union[bool_, integer[Any]]]], _NestedSequence[_Su
950- # pportsArray[dtype[Union[bool_, integer[Any]]]]],
951- # _NestedSequence[Union[bool, int]], Tuple[Union[SupportsIndex,
952- # _SupportsArray[dtype[Union[bool_, integer[Any]]]],
953- # _NestedSequence[_SupportsArray[dtype[Union[bool_, integer[Any]]]]], _N
954- # estedSequence[Union[bool, int]]], ...]]" [index]
955- data_slice = self .to_dense ()[key ] # type: ignore[index]
947+ data_slice = self .to_dense ()[key ]
956948 elif isinstance (key , slice ):
957949
958950 # Avoid densifying when handling contiguous slices
@@ -1192,9 +1184,7 @@ def _concat_same_type(
11921184
11931185 data = np .concatenate (values )
11941186 indices_arr = np .concatenate (indices )
1195- # Argument 2 to "IntIndex" has incompatible type "ndarray[Any,
1196- # dtype[signedinteger[_32Bit]]]"; expected "Sequence[int]"
1197- sp_index = IntIndex (length , indices_arr ) # type: ignore[arg-type]
1187+ sp_index = IntIndex (length , indices_arr )
11981188
11991189 else :
12001190 # when concatenating block indices, we don't claim that you'll
@@ -1384,8 +1374,7 @@ def __setstate__(self, state):
13841374 if isinstance (state , tuple ):
13851375 # Compat for pandas < 0.24.0
13861376 nd_state , (fill_value , sp_index ) = state
1387- # Need type annotation for "sparse_values" [var-annotated]
1388- sparse_values = np .array ([]) # type: ignore[var-annotated]
1377+ sparse_values = np .array ([])
13891378 sparse_values .__setstate__ (nd_state )
13901379
13911380 self ._sparse_values = sparse_values
0 commit comments