Skip to content

Commit

Permalink
Update message format for exception raised
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewgy8 committed Jan 18, 2025
1 parent af35169 commit c3fcf8d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/tablib/formats/_xlsx.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,11 @@ def dset_sheet(cls, dataset, ws, freeze_panes=True, escape=False):
@classmethod
def _adapt_column_width(cls, worksheet, width):
if isinstance(width, str) and width != "adaptive":
raise ValueError(f"Unsupported value `{width}` passed to `column_width` "
"parameter. It supports 'adaptive' or integer values")
msg = (
f"Invalid value for column_width: {width}. "
f"Must be 'adaptive' or an integer."
)
raise ValueError(msg)

if width is None:
return
Expand Down

0 comments on commit c3fcf8d

Please sign in to comment.