revert Timestamp and Timedelta constructors typing allowing NaTType return#48112
revert Timestamp and Timedelta constructors typing allowing NaTType return#48112mroeschke merged 4 commits intopandas-dev:mainfrom
Conversation
|
@mroeschke Not sure what to do here. I think that the level of On the one hand, I will see if I can workaround those issues. |
|
I think the issue is that for mypy If they cannot be fixed now, it is probably best to add those files to https://github.com/pandas-dev/pandas/blob/main/pyright_reportGeneralTypeIssues.json one day when this ignore list is small enough we can add in-line ignore comments. |
Yes, that is it.
Thanks for this suggestion. Will do this in next commit. |
twoertwein
left a comment
There was a problem hiding this comment.
Great that you were able to reduce the number of new files ignored by pyright's reportGeneralTypeIssues to only two!
Looks good to me, assuming the typing tests pass.
|
Probably the first catch of stubtest :) |
Thanks for finding that. I'll create |
|
@mroeschke so this is good to go. I don't know what to do about the failure with the CircleCI Pipeline |
…eturn (pandas-dev#48112) * revert Timestamp and Timedelta constructors typing allowing NaTType return * exclude 2 files from pyright. Fix up tz methods for NaTType * add tz and tzinfo methods * remove check that tz doesn't exist for NaT
Re discussion at #46171 (comment)
Has
TimestampandTimedeltaconstructors return union that includesNaTType