-
-
Notifications
You must be signed in to change notification settings - Fork 141
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
type align #1138
Conversation
pandas-stubs/core/frame.pyi
Outdated
limit: int | None = ..., | ||
fill_axis: Axis = ..., | ||
broadcast_axis: Axis | None = ..., | ||
fill_value: Hashable | None = ..., |
There was a problem hiding this comment.
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
pandas-stubs/core/frame.pyi
Outdated
limit: int | None = ..., | ||
fill_axis: Axis = ..., | ||
broadcast_axis: Axis | None = ..., | ||
fill_value: Hashable | None = ..., |
There was a problem hiding this comment.
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??
pandas-stubs/core/series.pyi
Outdated
limit: int | None = ..., | ||
fill_axis: AxisIndex = ..., | ||
broadcast_axis: AxisIndex | None = ..., | ||
fill_value: Hashable | None = ..., |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use Scalar | NAType | None
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!) |
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!! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @MarcoGorelli
@MarcoGorelli I just did a release today |
assert_type()
to assert the type of any return value