Skip to content

Commit 858dec6

Browse files
TYP: remove assert mask is not None for mypy (#33520)
1 parent 859cf95 commit 858dec6

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

pandas/core/nanops.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -300,11 +300,8 @@ def _get_values(
300300
dtype, fill_value=fill_value, fill_value_typ=fill_value_typ
301301
)
302302

303-
copy = (mask is not None) and (fill_value is not None)
304-
305-
if skipna and copy:
303+
if skipna and (mask is not None) and (fill_value is not None):
306304
values = values.copy()
307-
assert mask is not None # for mypy
308305
if dtype_ok and mask.any():
309306
np.putmask(values, mask, fill_value)
310307

0 commit comments

Comments
 (0)