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

Annotate ColumnAccessor._data labels as Hashable #16623

Merged
merged 1 commit into from
Aug 22, 2024

Conversation

mroeschke
Copy link
Contributor

Description

The motivating change here is that since we store a dictionary of columns in ColumnAccessor, the labels should be collections.abc.Hashable and therefore we can type methods that select by key with this annotation.

This led to a mypy-typing-validation cascade that made me type the output of def as_column(...) -> ColumnBase which also lead to typing validation in several other files.

Namely there no logic changes here.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@mroeschke mroeschke added Python Affects Python cuDF API. improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Aug 21, 2024
@mroeschke mroeschke requested a review from a team as a code owner August 21, 2024 01:19
@mroeschke mroeschke requested review from isVoid and lithomas1 August 21, 2024 01:19
@vyasr
Copy link
Contributor

vyasr commented Aug 22, 2024

/merge

@rapids-bot rapids-bot bot merged commit e4e867a into rapidsai:branch-24.10 Aug 22, 2024
80 checks passed
@mroeschke mroeschke deleted the type/ca branch August 22, 2024 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Improvement / enhancement to an existing function non-breaking Non-breaking change Python Affects Python cuDF API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants