File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -33,14 +33,12 @@ class Timedelta(timedelta):
33
33
max : ClassVar [Timedelta ]
34
34
resolution : ClassVar [Timedelta ]
35
35
value : int # np.int64
36
-
37
- # error: "__new__" must return a class instance (got "Union[Timedelta, NaTType]")
38
- def __new__ ( # type: ignore[misc]
36
+ def __new__ (
39
37
cls : Type [_S ],
40
38
value = ...,
41
39
unit : str = ...,
42
40
** kwargs : int | float | np .integer | np .floating ,
43
- ) -> _S | NaTType : ...
41
+ ) -> _S : ...
44
42
@property
45
43
def days (self ) -> int : ...
46
44
@property
Original file line number Diff line number Diff line change @@ -31,9 +31,7 @@ class Timestamp(datetime):
31
31
32
32
resolution : ClassVar [Timedelta ]
33
33
value : int # np.int64
34
-
35
- # error: "__new__" must return a class instance (got "Union[Timestamp, NaTType]")
36
- def __new__ ( # type: ignore[misc]
34
+ def __new__ (
37
35
cls : type [_DatetimeT ],
38
36
ts_input : int
39
37
| np .integer
@@ -56,7 +54,7 @@ class Timestamp(datetime):
56
54
tzinfo : _tzinfo | None = ...,
57
55
* ,
58
56
fold : int | None = ...,
59
- ) -> _DatetimeT | NaTType : ...
57
+ ) -> _DatetimeT : ...
60
58
def _set_freq (self , freq : BaseOffset | None ) -> None : ...
61
59
@property
62
60
def year (self ) -> int : ...
You can’t perform that action at this time.
0 commit comments