Skip to content
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

check_meta(): use __class__ when checking dataframe types #7099

Merged
merged 4 commits into from
Jan 25, 2021

Conversation

madsbk
Copy link
Contributor

@madsbk madsbk commented Jan 22, 2021

Similar to #6981, this PR makes check_meta() use x.__class__ instead of type(x) when checking dataframe types.

  • Tests added / passed
  • Passes black dask / flake8 dask

@madsbk madsbk force-pushed the check_meta_use_class_to_detect_dataframe branch from 83ac0f2 to 0171c2b Compare January 22, 2021 13:55
@mrocklin
Copy link
Member

Thanks @madsbk . I'm curious, does it make sense to include a test for this? Otherwise I would expect a change like this to have a decently high probability of being reverted at some point in the future.

@madsbk
Copy link
Contributor Author

madsbk commented Jan 22, 2021

Thanks @madsbk . I'm curious, does it make sense to include a test for this? Otherwise I would expect a change like this to have a decently high probability of being reverted at some point in the future.

Good point, I have been guilty of doing such a revert in the past :)
Will add a test

@madsbk
Copy link
Contributor Author

madsbk commented Jan 24, 2021

Added tests that will fail if x.__class__ isn't used.

Co-authored-by: Julia Signell <jsignell@gmail.com>
@jsignell jsignell merged commit fbbc271 into dask:master Jan 25, 2021
@madsbk madsbk deleted the check_meta_use_class_to_detect_dataframe branch February 16, 2021 08:58
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