From 28717b4e6e78193ad61c0c50176bb178f621d435 Mon Sep 17 00:00:00 2001 From: Kashif Khan <200~361477+kashifkhan@users.noreply.github.com> Date: Mon, 20 Dec 2021 11:49:01 -0600 Subject: [PATCH] Fix pre-commit error --- pandas/core/nanops.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/pandas/core/nanops.py b/pandas/core/nanops.py index 52d2322b11f42..dea6fb33e09fe 100644 --- a/pandas/core/nanops.py +++ b/pandas/core/nanops.py @@ -1391,14 +1391,10 @@ def _maybe_arg_null_out( if axis is None or not getattr(result, "ndim", False): if skipna: if mask.all(): - # error: Incompatible types in assignment (expression has type - # "int", variable has type "ndarray") - result = -1 # type: ignore[assignment] + return -1 else: if mask.any(): - # error: Incompatible types in assignment (expression has type - # "int", variable has type "ndarray") - result = -1 # type: ignore[assignment] + return -1 else: if skipna: na_mask = mask.all(axis)