diff --git a/pandas/_libs/tslibs/nattype.pyi b/pandas/_libs/tslibs/nattype.pyi index f49e894a0bfec..fa1577f033fff 100644 --- a/pandas/_libs/tslibs/nattype.pyi +++ b/pandas/_libs/tslibs/nattype.pyi @@ -9,6 +9,7 @@ from typing import ( Literal, NoReturn, TypeAlias, + overload, ) import numpy as np @@ -159,15 +160,31 @@ class NaTType: # inject Period properties @property def qyear(self) -> float: ... + # comparisons def __eq__(self, other: object) -> bool: ... def __ne__(self, other: object) -> bool: ... __lt__: _NatComparison __le__: _NatComparison __gt__: _NatComparison __ge__: _NatComparison + # unary operators + def __pos__(self) -> Self: ... + def __neg__(self) -> Self: ... + # binary operators def __sub__(self, other: Self | timedelta | datetime) -> Self: ... def __rsub__(self, other: Self | timedelta | datetime) -> Self: ... def __add__(self, other: Self | timedelta | datetime) -> Self: ... def __radd__(self, other: Self | timedelta | datetime) -> Self: ... + def __mul__(self, other: float) -> Self: ... # analogous to timedelta + def __rmul__(self, other: float) -> Self: ... + @overload # analogous to timedelta + def __truediv__(self, other: Self | timedelta) -> float: ... # Literal[NaN] + @overload + def __truediv__(self, other: float) -> Self: ... + @overload # analogous to timedelta + def __floordiv__(self, other: Self | timedelta) -> float: ... # Literal[NaN] + @overload + def __floordiv__(self, other: float) -> Self: ... + # other def __hash__(self) -> int: ... def as_unit(self, unit: str, round_ok: bool = ...) -> NaTType: ...