Skip to content

Commit

Permalink
use InvalidOperationError
Browse files Browse the repository at this point in the history
  • Loading branch information
ritchie46 committed Apr 19, 2024
1 parent 5a2200f commit ab43c1b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crates/polars-io/src/csv/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ pub fn infer_file_schema_inner(

pub(super) fn check_decimal_float(decimal_float: bool, separator: u8) -> PolarsResult<()> {
if decimal_float {
polars_ensure!(b',' != separator, ComputeError: "'decimal_float' argument cannot be combined with ',' quote char")
polars_ensure!(b',' != separator, InvalidOperation: "'decimal_float' argument cannot be combined with ',' quote char")
}
Ok(())
}
Expand Down
2 changes: 1 addition & 1 deletion py-polars/tests/unit/io/test_csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -2068,6 +2068,6 @@ def test_csv_float_decimal() -> None:

floats = b"a;b\n12,239;1,233\n13,908;87,32"
with pytest.raises(
pl.ComputeError, match=r"'decimal_float' argument cannot be combined"
pl.InvalidOperationError, match=r"'decimal_float' argument cannot be combined"
):
pl.read_csv(floats, decimal_float=True)

0 comments on commit ab43c1b

Please sign in to comment.