Skip to content

Commit 323ed9b

Browse files
authored
TYP: remove mypy ignore from array_manager.py (#52249)
* TYP: remove ignore from array_manager.py * TYP: remove ignore from array_manager.py II * TYP: remove ignore from array_manager.py III
1 parent 0cdaa71 commit 323ed9b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

pandas/core/internals/array_manager.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -834,17 +834,15 @@ def iset(
834834

835835
# multiple columns -> convert slice or array to integer indices
836836
elif isinstance(loc, slice):
837-
indices = range(
837+
indices: range | np.ndarray = range(
838838
loc.start if loc.start is not None else 0,
839839
loc.stop if loc.stop is not None else self.shape_proper[1],
840840
loc.step if loc.step is not None else 1,
841841
)
842842
else:
843843
assert isinstance(loc, np.ndarray)
844844
assert loc.dtype == "bool"
845-
# error: Incompatible types in assignment (expression has type "ndarray",
846-
# variable has type "range")
847-
indices = np.nonzero(loc)[0] # type: ignore[assignment]
845+
indices = np.nonzero(loc)[0]
848846

849847
assert value.ndim == 2
850848
assert value.shape[0] == len(self._axes[0])

0 commit comments

Comments
 (0)