Skip to content

Commit

Permalink
c
Browse files Browse the repository at this point in the history
  • Loading branch information
nameexhaustion committed Oct 25, 2024
1 parent c0a6dd9 commit 02cbbc2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions crates/polars-ops/src/chunked_array/list/to_struct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,10 @@ mod _serde_impl {
S: serde::Serializer,
{
use serde::ser::Error;
Err(S::Error::custom(format!(
Err(S::Error::custom(
"cannot serialize name generator function for to_struct, \
consider passing a list of field names instead."
)))
consider passing a list of field names instead.",
))
}
}

Expand Down
2 changes: 1 addition & 1 deletion py-polars/tests/unit/test_errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,7 @@ def test_no_panic_pandas_nat() -> None:


def test_list_to_struct_invalid_type() -> None:
with pytest.raises(pl.exceptions.SchemaError):
with pytest.raises(pl.exceptions.InvalidOperationError):
pl.DataFrame({"a": 1}).select(pl.col("a").list.to_struct())


Expand Down

0 comments on commit 02cbbc2

Please sign in to comment.