Skip to content

Commit 339e2aa

Browse files
simonjayhawkinsCloseChoice
authored andcommitted
TYP: remove assert mask is not None for mypy (pandas-dev#33520)
1 parent 06562a6 commit 339e2aa

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

pandas/core/nanops.py

Lines changed: 1 addition & 4 deletions
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)