Skip to content

Commit 82a6617

Browse files
committed
mypy fixu[
1 parent 9f7a2fe commit 82a6617

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pandas/core/arrays/datetimes.py

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from typing import (
1010
TYPE_CHECKING,
1111
Literal,
12+
cast,
1213
)
1314
import warnings
1415

@@ -2399,6 +2400,7 @@ def _validate_dt64_dtype(dtype):
23992400
# Without this, things like adding an array of timedeltas and
24002401
# a tz-aware Timestamp (with a tz specific to its datetime) will
24012402
# be incorrect(ish?) for the array as a whole
2403+
dtype = cast(DatetimeTZDtype, dtype)
24022404
dtype = DatetimeTZDtype(tz=timezones.tz_standardize(dtype.tz))
24032405

24042406
return dtype

0 commit comments

Comments
 (0)