Skip to content

Commit 3713e9a

Browse files
kashifkhanKashif Khan
and
Kashif Khan
authored
fix mypy typ error (#45068)
Co-authored-by: Kashif Khan <[email protected]>
1 parent e18921e commit 3713e9a

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

pandas/core/arrays/timedeltas.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -748,12 +748,8 @@ def __rfloordiv__(self, other):
748748
return result
749749

750750
elif is_object_dtype(other.dtype):
751-
# error: Incompatible types in assignment (expression has type
752-
# "List[Any]", variable has type "ndarray")
753-
result = [ # type: ignore[assignment]
754-
other[n] // self[n] for n in range(len(self))
755-
]
756-
result = np.array(result)
751+
result_list = [other[n] // self[n] for n in range(len(self))]
752+
result = np.array(result_list)
757753
return result
758754

759755
else:

0 commit comments

Comments
 (0)