From c341f9b42efec7bfa344ea50ca2afccbbab8ecbe Mon Sep 17 00:00:00 2001 From: Kashif Khan <200~361477+kashifkhan@users.noreply.github.com> Date: Sat, 25 Dec 2021 10:16:53 -0600 Subject: [PATCH] fix mypy typ error --- pandas/core/arrays/timedeltas.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/pandas/core/arrays/timedeltas.py b/pandas/core/arrays/timedeltas.py index 4e58ebc518bb4..79387cc2584da 100644 --- a/pandas/core/arrays/timedeltas.py +++ b/pandas/core/arrays/timedeltas.py @@ -748,12 +748,8 @@ def __rfloordiv__(self, other): return result elif is_object_dtype(other.dtype): - # error: Incompatible types in assignment (expression has type - # "List[Any]", variable has type "ndarray") - result = [ # type: ignore[assignment] - other[n] // self[n] for n in range(len(self)) - ] - result = np.array(result) + result_list = [other[n] // self[n] for n in range(len(self))] + result = np.array(result_list) return result else: