Skip to content

Commit 404e640

Browse files
committed
fix: Show correct length in TableStyle warning
1 parent 71f990f commit 404e640

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: table2ascii/table_style.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@ def from_string(cls, string: str) -> "TableStyle":
128128
raise TableStyleTooLongError(string, num_params)
129129
# if the string is too short, show a warning and pad it with spaces
130130
elif len(string) < num_params:
131-
string += " " * (num_params - len(string))
132131
warnings.warn(TableStyleTooShortWarning(string, num_params), stacklevel=2)
132+
string += " " * (num_params - len(string))
133133
return cls(*string)
134134

135135
def set(self, **kwargs) -> "TableStyle":

0 commit comments

Comments
 (0)