Skip to content

Conversation

MarcoGorelli
Copy link
Member

FrozenlList isn't public, and doesn't appear in any other types. OK to just remove it?

  • Closes #xxxx (Replace xxxx with the Github issue number)
  • Tests added: Please use assert_type() to assert the type of any return value

@MarcoGorelli MarcoGorelli marked this pull request as ready for review October 3, 2025 09:44
Copy link
Contributor

@cmp0xff cmp0xff left a comment

Choose a reason for hiding this comment

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

Thank you @MarcoGorelli !

Comment on lines -50 to +51
def __new__(cls, *args, freq: Frequency, **kwargs) -> TimeGrouper: ...
def __new__(cls, *args: Any, freq: Frequency, **kwargs: Any) -> TimeGrouper: ...
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.

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.

@cmp0xff cmp0xff merged commit 91dd427 into pandas-dev:main Oct 3, 2025
13 checks passed
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.

3 participants