Skip to content

fix: Revert length check of patterns in str.extract_many() #20953

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

Merged
merged 1 commit into from
Jan 29, 2025

Conversation

etiennebacher
Copy link
Contributor

@etiennebacher etiennebacher commented Jan 28, 2025

Closes #20962.

This was introduced in #20781 and noticed here: #20781 (comment). Thanks @eitsupi.

Like other str.*_many() functions, str.extract_many() shouldn't check the length of the patterns arg.
This was overlooked in the tests because the main test for extract_many() only had one value and one list of patterns. I updated it to ensure that lengths of input and patterns can be different. Sorry for the mistake.

@github-actions github-actions bot added fix Bug fix python Related to Python Polars rust Related to Rust Polars labels Jan 28, 2025
@etiennebacher

This comment was marked as outdated.

Copy link

codecov bot commented Jan 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.29%. Comparing base (3def63b) to head (176f473).
Report is 11 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #20953      +/-   ##
==========================================
- Coverage   79.30%   79.29%   -0.01%     
==========================================
  Files        1578     1578              
  Lines      224156   224199      +43     
  Branches     2576     2573       -3     
==========================================
+ Hits       177762   177786      +24     
- Misses      45803    45825      +22     
+ Partials      591      588       -3     

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

@ritchie46 ritchie46 merged commit a7b933a into pola-rs:main Jan 29, 2025
29 checks passed
@etiennebacher etiennebacher deleted the fix-extract-many branch February 3, 2025 21:09
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 rust Related to Rust Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

str.extract_many throws ComputeError in Polars 1.21.0
2 participants