@@ -944,15 +944,7 @@ def __getitem__(
944
944
if is_integer (key ):
945
945
return self ._get_val_at (key )
946
946
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 ]
956
948
elif isinstance (key , slice ):
957
949
958
950
# Avoid densifying when handling contiguous slices
@@ -1192,9 +1184,7 @@ def _concat_same_type(
1192
1184
1193
1185
data = np .concatenate (values )
1194
1186
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 )
1198
1188
1199
1189
else :
1200
1190
# when concatenating block indices, we don't claim that you'll
@@ -1384,8 +1374,7 @@ def __setstate__(self, state):
1384
1374
if isinstance (state , tuple ):
1385
1375
# Compat for pandas < 0.24.0
1386
1376
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 ([])
1389
1378
sparse_values .__setstate__ (nd_state )
1390
1379
1391
1380
self ._sparse_values = sparse_values
0 commit comments