Skip to content

type align #1138

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 3 commits into from
Mar 4, 2025
Merged

type align #1138

merged 3 commits into from
Mar 4, 2025

Conversation

MarcoGorelli
Copy link
Member

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

limit: int | None = ...,
fill_axis: Axis = ...,
broadcast_axis: Axis | None = ...,
fill_value: Hashable | None = ...,
Copy link
Member Author

Choose a reason for hiding this comment

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

some methods use Hashable for fill_value, others Scalar, I'm not sure. anyway for now in this PR I'm just going with what's in pandas

@MarcoGorelli MarcoGorelli marked this pull request as ready for review March 2, 2025 16:45
limit: int | None = ...,
fill_axis: Axis = ...,
broadcast_axis: Axis | None = ...,
fill_value: Hashable | None = ...,
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should be Scalar | NAType | None . In the stubs, we want to promote "good" behavior, and Hashable is too wide. In addition, the docs say "fill value: scalar, default np.nan" . Maybe the pandas source should change??

limit: int | None = ...,
fill_axis: AxisIndex = ...,
broadcast_axis: AxisIndex | None = ...,
fill_value: Hashable | None = ...,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Use Scalar | NAType | None

@MarcoGorelli
Copy link
Member Author

By the way, hope it's OK to ask, is a release planned any time soon? Some of the recent improvements would help out with internal type checking in Narwhals (no hurry / pressure of course!)

@Dr-Irv
Copy link
Collaborator

Dr-Irv commented Mar 4, 2025

Quote reply

Yes. I think once your other PR's are done, I will do a release. I was going to do one this past Saturday, but had to wait for pyright to be updated, and by the time that happened, you had created a bunch of PRs!!

Copy link
Collaborator

@Dr-Irv Dr-Irv left a comment

Choose a reason for hiding this comment

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

Thanks @MarcoGorelli

@Dr-Irv Dr-Irv merged commit bdd0946 into pandas-dev:main Mar 4, 2025
10 checks passed
@Dr-Irv
Copy link
Collaborator

Dr-Irv commented Mar 8, 2025

By the way, hope it's OK to ask, is a release planned any time soon? Some of the recent improvements would help out with internal type checking in Narwhals (no hurry / pressure of course!)

@MarcoGorelli I just did a release today

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.

2 participants