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

fix(python): Update some Series dunder method type signatures #17053

Merged

Conversation

alexander-beedie
Copy link
Collaborator

@alexander-beedie alexander-beedie commented Jun 18, 2024

Closes #17048.

The correct typing for "other" here is Any (it can legitimately be almost anything, and we handle the case that it is not a Series internally; fixing this also lets us ditch a few "type: ignore" directives in the unit tests).

@alexander-beedie alexander-beedie changed the title fix(python): Some Series dunder method type signatures fix(python): Update some Series dunder method type signatures Jun 18, 2024
@github-actions github-actions bot added fix Bug fix python Related to Python Polars labels Jun 18, 2024
@alexander-beedie alexander-beedie force-pushed the series-dunder-method-typing branch from 651558f to c423bc0 Compare June 18, 2024 17:05
Copy link

codecov bot commented Jun 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.87%. Comparing base (2aec475) to head (c423bc0).
Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #17053      +/-   ##
==========================================
- Coverage   80.94%   80.87%   -0.08%     
==========================================
  Files        1449     1455       +6     
  Lines      190705   190954     +249     
  Branches     2723     2723              
==========================================
+ Hits       154372   154434      +62     
- Misses      35829    36016     +187     
  Partials      504      504              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@stinodego stinodego left a comment

Choose a reason for hiding this comment

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

Fair enough! Perhaps we should define an IntoSeries here, just like we have IntoExpr. Any will have to do for now.

@stinodego stinodego merged commit 14dd2ca into pola-rs:main Jun 18, 2024
15 checks passed
@alexander-beedie alexander-beedie deleted the series-dunder-method-typing branch June 19, 2024 06:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Bug fix python Related to Python Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[typing] Boolean operators like Series.__xor__ do not support scalar operands.
2 participants