Skip to content

Commit 5642b38

Browse files
committed
Enabled ruff rule EM102
1 parent a26950b commit 5642b38

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ ignore = [
9999
"PLR2004",
100100
# "PERF401",
101101
"PD901",
102-
"EM102",
102+
# "EM102",
103103
"ERA001",
104104
"SIM108",
105105
"ICN001",

python/datafusion/dataframe.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,11 @@ def from_str(cls: type[Compression], value: str) -> Compression:
8989
return cls(value.lower())
9090
except ValueError as err:
9191
valid_values = str([item.value for item in Compression])
92-
raise ValueError(
93-
f"{value} is not a valid Compression. Valid values are: {valid_values}"
94-
) from err
92+
error_msg = f"""
93+
{value} is not a valid Compression.
94+
Valid values are: {valid_values}
95+
"""
96+
raise ValueError(error_msg) from err
9597

9698
def get_default_level(self) -> Optional[int]:
9799
"""Get the default compression level for the compression type.

0 commit comments

Comments
 (0)