Skip to content

Commit 9b4dfa1

Browse files
CI: fix mypy error (quick fix) (#37914)
1 parent 91f5bfc commit 9b4dfa1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pandas/core/indexes/datetimelike.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,10 @@ def intersection(self, other, sort=False):
773773
else:
774774
lslice = slice(*left.slice_locs(start, end))
775775
left_chunk = left._values[lslice]
776-
result = type(self)._simple_new(left_chunk)
776+
# error: Argument 1 to "_simple_new" of "DatetimeIndexOpsMixin" has
777+
# incompatible type "Union[ExtensionArray, Any]"; expected
778+
# "Union[DatetimeArray, TimedeltaArray, PeriodArray]" [arg-type]
779+
result = type(self)._simple_new(left_chunk) # type: ignore[arg-type]
777780

778781
return self._wrap_setop_result(other, result)
779782

0 commit comments

Comments
 (0)