From 65fcf28e947fe10e795cfe4d4a90f1119f6cbf40 Mon Sep 17 00:00:00 2001 From: Simon Hawkins Date: Tue, 17 Nov 2020 19:43:04 +0000 Subject: [PATCH] CI: fix mypy error (quick fix) --- pandas/core/indexes/datetimelike.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pandas/core/indexes/datetimelike.py b/pandas/core/indexes/datetimelike.py index 88383cb7bbb6a..71c72e97b8ada 100644 --- a/pandas/core/indexes/datetimelike.py +++ b/pandas/core/indexes/datetimelike.py @@ -773,7 +773,10 @@ def intersection(self, other, sort=False): else: lslice = slice(*left.slice_locs(start, end)) left_chunk = left._values[lslice] - result = type(self)._simple_new(left_chunk) + # error: Argument 1 to "_simple_new" of "DatetimeIndexOpsMixin" has + # incompatible type "Union[ExtensionArray, Any]"; expected + # "Union[DatetimeArray, TimedeltaArray, PeriodArray]" [arg-type] + result = type(self)._simple_new(left_chunk) # type: ignore[arg-type] return self._wrap_setop_result(other, result)