@@ -9,6 +9,7 @@ from typing import (
9
9
Literal ,
10
10
NoReturn ,
11
11
TypeAlias ,
12
+ overload ,
12
13
)
13
14
14
15
import numpy as np
@@ -159,15 +160,31 @@ class NaTType:
159
160
# inject Period properties
160
161
@property
161
162
def qyear (self ) -> float : ...
163
+ # comparisons
162
164
def __eq__ (self , other : object ) -> bool : ...
163
165
def __ne__ (self , other : object ) -> bool : ...
164
166
__lt__ : _NatComparison
165
167
__le__ : _NatComparison
166
168
__gt__ : _NatComparison
167
169
__ge__ : _NatComparison
170
+ # unary operators
171
+ def __pos__ (self ) -> Self : ...
172
+ def __neg__ (self ) -> Self : ...
173
+ # binary operators
168
174
def __sub__ (self , other : Self | timedelta | datetime ) -> Self : ...
169
175
def __rsub__ (self , other : Self | timedelta | datetime ) -> Self : ...
170
176
def __add__ (self , other : Self | timedelta | datetime ) -> Self : ...
171
177
def __radd__ (self , other : Self | timedelta | datetime ) -> Self : ...
178
+ def __mul__ (self , other : float ) -> Self : ... # analogous to timedelta
179
+ def __rmul__ (self , other : float ) -> Self : ...
180
+ @overload # analogous to timedelta
181
+ def __truediv__ (self , other : Self | timedelta ) -> float : ... # Literal[NaN]
182
+ @overload
183
+ def __truediv__ (self , other : float ) -> Self : ...
184
+ @overload # analogous to timedelta
185
+ def __floordiv__ (self , other : Self | timedelta ) -> float : ... # Literal[NaN]
186
+ @overload
187
+ def __floordiv__ (self , other : float ) -> Self : ...
188
+ # other
172
189
def __hash__ (self ) -> int : ...
173
190
def as_unit (self , unit : str , round_ok : bool = ...) -> NaTType : ...
0 commit comments