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

table2ascii/table_style.py

Lines changed: 1 addition & 1 deletion
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy