Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Support a wider range of iterables in
SchemaBase.to_dict
(#3501)
* feat: Support a wider range of iterables in `SchemaBase.to_dict` * test: Update validation errors to use non-iterable element type Previously `list[set[str]]` * fix: Prevent `to_dict` method being called on `pd.Series` AFAIK, this is the intended case for `Parameter | Expression` not for converting arbitrary objects * test: Add tests for iterables and ranges * fix(typing): Ignore type errors for tests * refactor: Use `narwhals.stable.v1` #3501 (comment) * test: Increase coverage in `test_to_dict_iterables` The original test obscured the fact that this change applies anywhere a `Sequence` is annotated. * docs: Add a doc for `test_to_dict_iterables` * revert: Change `test_chart_validation_errors` back to demonstrate failures to @joelostblom Reverting 1f3dfd3 #3501 (comment) * docs: Update User Guide to use `Sequence` #3501 (comment) * test: Fix `test_chart_validation_errors` failure verbosity #3501 (comment) * refactor: Move `inspect.cleandoc` inside of `test_chart_validation_errors` All 18 cases use this, saves 30 lines * revert: Restore original fix to `test_chart_validation_errors` #3501 (comment) #3501 (comment) #3501 (comment) * docs: Remove "ordered" descriptor from `Sequence` Co-authored-by: Joel Ostblom <[email protected]> * test: Remove missed `inspect.cleandoc` #3501 (comment) * test: Only modify message, not input to `test_chart_validation_errors` #3501 (comment) * style: fix oddly formatted `test_multiple_field_strings_in_condition` --------- Co-authored-by: Joel Ostblom <[email protected]>
- Loading branch information