Skip to content

Commit 031397c

Browse files
committed
add comments with ref to PR for reasoning
1 parent 39b3b98 commit 031397c

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

pandas/_libs/tslibs/timedeltas.pyi

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ class Timedelta(timedelta):
3939
unit: str = ...,
4040
**kwargs: int | float | np.integer | np.floating,
4141
) -> _S: ...
42+
# GH 46171
43+
# While Timedelta can return pd.NaT, having the constructor return
44+
# a Union with NaTType makes things awkward for users of pandas
4245
@property
4346
def days(self) -> int: ...
4447
@property

pandas/_libs/tslibs/timestamps.pyi

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ class Timestamp(datetime):
5555
*,
5656
fold: int | None = ...,
5757
) -> _DatetimeT: ...
58+
# GH 46171
59+
# While Timestamp can return pd.NaT, having the constructor return
60+
# a Union with NaTType makes things awkward for users of pandas
5861
def _set_freq(self, freq: BaseOffset | None) -> None: ...
5962
@property
6063
def year(self) -> int: ...

0 commit comments

Comments
 (0)