-
Notifications
You must be signed in to change notification settings - Fork 2.5k
fix(python): Handle non-Sequence iterables in filter #16254
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): Handle non-Sequence iterables in filter #16254
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #16254 +/- ##
==========================================
- Coverage 81.39% 81.37% -0.03%
==========================================
Files 1406 1406
Lines 183953 183955 +2
Branches 2958 2959 +1
==========================================
- Hits 149731 149694 -37
- Misses 33709 33748 +39
Partials 513 513 ☔ View full report in Codecov by Sentry. |
24c125a to
1c5ebd9
Compare
Adapted from @alexander-beedie on [discord](https://discord.com/channels/908022250106667068/908022461751234570/1242428077955354684). I added 2 non-expression cases for the boolean masks.
|
@alexander-beedie hoping this is good to go now |
Fixes #16253
I tried to keep the logic as close to the original as possible.
E.g, prioritising the fast paths.
Was wondering if the
is_sequencecheck that follows is the best option though.Edit:
To elaborate on the
is_sequencecomment further.Acceptable inputs at that stage are:
Exprstrrepresenting a column name inself.columnsSequencethat is not aSeriesWhere parsing
3is defered toparse_as_list_of_expressions.