Skip to content

refactor: #718 only drop TimestampSeries #1274

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cmp0xff
Copy link
Contributor

@cmp0xff cmp0xff commented Jul 13, 2025

@cmp0xff cmp0xff marked this pull request as ready for review July 13, 2025 07:05
@cmp0xff cmp0xff changed the title fix: #718 only drop TimestampSeries refactor: #718 only drop TimestampSeries Jul 13, 2025
Comment on lines +624 to +643
check(
assert_type(s5.dt.as_unit("s"), "pd.Series[pd.Timedelta]"), # type: ignore[assert-type]
pd.Series,
pd.Timedelta,
)
check(
assert_type(s5.dt.as_unit("ms"), "pd.Series[pd.Timedelta]"), # type: ignore[assert-type]
pd.Series,
pd.Timedelta,
)
check(
assert_type(s5.dt.as_unit("us"), "pd.Series[pd.Timedelta]"), # type: ignore[assert-type]
pd.Series,
pd.Timedelta,
)
check(
assert_type(s5.dt.as_unit("ns"), "pd.Series[pd.Timedelta]"), # type: ignore[assert-type]
pd.Series,
pd.Timedelta,
)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These type: ignores will be removed in #1273

Comment on lines +1618 to +1656
@overload
def __add__(
self: Series[Timestamp], other: _nonseries_timestamp | Series[Timestamp]
) -> Never: ...
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Disabling mypy from recognising Series[Any] + Series[Any] -> Series[Any] in test_sum_get_add and test_series_min_max_sub_axis

check(assert_type(sa, pd.Series), pd.Series)
check(assert_type(ss, pd.Series), pd.Series)
check(assert_type(sa, pd.Series), pd.Series) # type: ignore[assert-type]
check(assert_type(ss, pd.Series), pd.Series) # type: ignore[assert-type]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Comment on lines +2819 to +2821
check(assert_type(s + summer, pd.Series), pd.Series) # type: ignore[assert-type]
check(assert_type(s + df["y"], pd.Series), pd.Series) # type: ignore[assert-type]
check(assert_type(summer + summer, pd.Series), pd.Series) # type: ignore[assert-type]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@cmp0xff cmp0xff force-pushed the hotfix/cmp0xff/gh718-drop-tss branch from c81cd6e to d5e1089 Compare July 16, 2025 17:54
@cmp0xff cmp0xff marked this pull request as draft July 16, 2025 17:56
@cmp0xff cmp0xff force-pushed the hotfix/cmp0xff/gh718-drop-tss branch from d5e1089 to 41c7015 Compare July 16, 2025 18:19
@cmp0xff cmp0xff marked this pull request as ready for review July 16, 2025 20:11
@cmp0xff cmp0xff force-pushed the hotfix/cmp0xff/gh718-drop-tss branch from 41c7015 to abf9147 Compare July 17, 2025 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant