Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
lukemanley committed Jan 12, 2025
1 parent f029d3e commit 4a1e511
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion py-polars/polars/io/csv/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -1399,7 +1399,8 @@ def _scan_csv_impl(
dtype_list: list[tuple[str, PolarsDataType]] | None = None
if schema_overrides is not None:
if not isinstance(schema_overrides, dict):
raise TypeError("expected 'schema_overrides' dict, found 'list'")
msg = "expected 'schema_overrides' dict, found 'list'"
raise TypeError(msg)
dtype_list = []
for k, v in schema_overrides.items():
dtype_list.append((k, parse_into_dtype(v)))
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 @@ -2079,7 +2079,7 @@ def test_read_csv_invalid_schema_overrides_length() -> None:
else:
err = InvalidOperationError
match = "The number of schema overrides must be less than or equal to the number of fields"

with pytest.raises(err, match=match):
pl.read_csv(f, schema_overrides=[pl.Int64, pl.String, pl.Boolean])

Expand Down

0 comments on commit 4a1e511

Please # to comment.