-
Notifications
You must be signed in to change notification settings - Fork 125
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
chore: fix pandas-stubs issues #2008
chore: fix pandas-stubs issues #2008
Conversation
This looks great! Tiny question: |
thanks - yup that works! |
@MarcoGorelli do you wanna steal all the related fixes I did in the tests from #2007? Once |
@MarcoGorelli the ignore(s) will show up for `mypy` after #2008 (I assume) #2007 (review)
@@ -26,10 +26,10 @@ | |||
|
|||
|
|||
def n_unique() -> dd.Aggregation: | |||
def chunk(s: pd.core.groupby.generic.SeriesGroupBy) -> int: | |||
def chunk(s: pd.core.groupby.generic.SeriesGroupBy) -> pd.Series[Any]: |
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.
Need to see if we can drop the `suppress` on older versions narwhals-dev#2008 (comment)
sentinel = object() | ||
if ( | ||
isinstance(dtype, pd.api.extensions.ExtensionDtype) | ||
and getattr(dtype, "base", sentinel) is 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.
Related to avoiding pd.core
(#2008 (comment))
Available since 0.23.0
Pretty sure we don't need with suppress(AttributeError):
with this?
@MarcoGorelli
I have a feeling all of these tests were not being type checked - because they had a Like I was already seeing this with Resolved all 40+ of the new errors in (#2008 (commits)) |
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.
@MarcoGorelli I'm happy to merge like this and follow up with a deeper look into reducing pd.core
(https://github.com/narwhals-dev/narwhals/pull/2008/files#r1958289318)
I don't know why mypy
isn't warning about this, but seems to be the next target in making pyright
happier
amazing, thanks a lot @dangotbanned ! |
What type of PR is this? (check all applicable)
Related issues
Checklist
If you have comments or can explain your changes, please do so below