Skip to content

Commit 7697978

Browse files
辰言辰言
authored andcommitted
style(conversions): shorten ValueError message to comply with ruff E501 line length limit
1 parent 2d0e96c commit 7697978

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

conversions/excel_title_to_column.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,14 @@ def excel_title_to_column(column_title: str) -> int:
1919
>>> excel_title_to_column("")
2020
Traceback (most recent call last):
2121
...
22-
ValueError: Column title must be a non-empty string containing only alphabetic characters.
22+
ValueError: Column title must contain only alphabetic characters.
2323
>>> excel_title_to_column("A1")
2424
Traceback (most recent call last):
2525
...
26-
ValueError: Column title must be a non-empty string containing only alphabetic characters.
26+
ValueError: Column title must contain only alphabetic characters.
2727
"""
2828
if not column_title or not column_title.isalpha():
29-
raise ValueError(
30-
"Column title must be a non-empty string containing only alphabetic characters."
31-
)
29+
raise ValueError("Column title must contain only alphabetic characters.")
3230

3331
column_title = column_title.upper()
3432
answer = 0

0 commit comments

Comments
 (0)