Skip to content

added np.timedelta64 for series arithmatic methods #432

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

Merged
merged 21 commits into from
Nov 23, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions tests/test_timefuncs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1043,11 +1043,11 @@ def timedelta64_and_arithmatic_operator() -> None:
s2 = pd.Series(data=pd.date_range("1/1/2021", "2/1/2021"))
s3 = s2 - s1
td = np.timedelta64(1, "M")
assert_type((s1 - td), TimestampSeries)
assert_type((s1 + td), TimestampSeries)
assert_type((s1 * td), NoReturn)
assert_type((s1 / td), NoReturn)
assert_type((s3 - td), TimedeltaSeries)
assert_type((s3 + td), TimedeltaSeries)
assert_type((s3 * td), NoReturn)
assert_type((s3 / td), pd.Series[float])
assert_type((s1 - td), TimestampSeries) # type: ignore
assert_type((s1 + td), TimestampSeries) # type: ignore
assert_type((s1 * td), NoReturn) # type: ignore
assert_type((s1 / td), NoReturn) # type: ignore
assert_type((s3 - td), TimedeltaSeries) # type: ignore
assert_type((s3 + td), TimedeltaSeries) # type: ignore
assert_type((s3 * td), NoReturn) # type: ignore
assert_type((s3 / td), pd.Series[float]) # type: ignore
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do NOT put #type: ignore in the testing functions.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok sir