Skip to content

Commit 3de5abd

Browse files
committed
mypy fixup
1 parent 38b6552 commit 3de5abd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pandas/core/arrays/datetimes.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,9 @@ def _check_compatible_with(self, other, setitem: bool = False):
510510

511511
def _box_func(self, x) -> Timestamp | NaTType:
512512
if isinstance(x, np.datetime64):
513-
x = np.int64(x)
513+
# Argument 1 to "signedinteger" has incompatible type "datetime64";
514+
# expected "Union[SupportsInt, Union[str, bytes], SupportsIndex]"
515+
x = np.int64(x) # type: ignore[arg-type]
514516
ts = Timestamp(x, tz=self.tz)
515517
# Non-overlapping identity check (left operand type: "Timestamp",
516518
# right operand type: "NaTType")

0 commit comments

Comments
 (0)