-
-
Notifications
You must be signed in to change notification settings - Fork 154
GH1432 Partial resolution for some TODOs #1492
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -95,9 +95,13 @@ def test_types_init() -> None: | |
| def test_types_arithmetic() -> None: | ||
| ts = pd.to_datetime("2021-03-01") | ||
| ts2 = pd.to_datetime("2021-01-01") | ||
| ts_np = np.datetime64("2021-01-01") | ||
| delta = pd.to_timedelta("1 day") | ||
|
|
||
| check(assert_type(ts - ts2, pd.Timedelta), pd.Timedelta) | ||
| check(assert_type(ts - ts_np, pd.Timedelta), pd.Timedelta) | ||
| # TODO: pandas-dev/pandas-stubs#1432 mypy sees datetime.timedelta but pyright is correct | ||
| # check(assert_type(ts_np - ts, pd.Timedelta), pd.Timedelta) | ||
|
Comment on lines
+103
to
+104
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see our |
||
| check(assert_type(ts + delta, pd.Timestamp), pd.Timestamp) | ||
| check(assert_type(ts - delta, pd.Timestamp), pd.Timestamp) | ||
| check(assert_type(ts - dt.datetime(2021, 1, 3), pd.Timedelta), pd.Timedelta) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In 3.0 the default value will be switched from
"numpy_nullable"tono_default. I think this can be confusing to users using the stable releases 2.x. What should we do @Dr-Irv ? Anyway, we can address this in a separate PR.