Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 0 additions & 1 deletion pandas-stubs/api/typing/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ from pandas.core.groupby import (
DataFrameGroupBy as DataFrameGroupBy,
SeriesGroupBy as SeriesGroupBy,
)
from pandas.core.indexes.frozen import FrozenList as FrozenList
Copy link
Contributor

Choose a reason for hiding this comment

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

From https://github.com/pandas-dev/pandas-stubs?tab=readme-ov-file#differences-between-type-declarations-in-pandas-and-pandas-stubs:

The https://github.com/pandas-dev/pandas-stubs/ project provides type declarations for the pandas public API.

Hence we should remove FrozenList which belongs to the Internals.

from pandas.core.resample import (
DatetimeIndexResamplerGroupby as DatetimeIndexResamplerGroupby,
PeriodIndexResamplerGroupby as PeriodIndexResamplerGroupby,
Expand Down
3 changes: 2 additions & 1 deletion pandas-stubs/core/groupby/grouper.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ from collections.abc import (
Iterator,
)
from typing import (
Any,
final,
overload,
)
Expand Down Expand Up @@ -47,7 +48,7 @@ class Grouper:
dropna: bool = ...,
) -> Self: ...
@overload
def __new__(cls, *args, freq: Frequency, **kwargs) -> TimeGrouper: ...
def __new__(cls, *args: Any, freq: Frequency, **kwargs: Any) -> TimeGrouper: ...
Comment on lines -50 to +51
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see that we always add Any throughout this repo - shall we do so, @Dr-Irv ?

It looks better for me, though.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't see that we always add Any throughout this repo - shall we do so, @Dr-Irv ?

For **kwargs and *args, it's OK.

@final
def __repr__(self) -> str: ... # noqa: PYI029 __repr__ here is final

Expand Down
9 changes: 0 additions & 9 deletions pandas-stubs/core/indexes/frozen.pyi

This file was deleted.