@@ -90,8 +90,8 @@ def __init__(
90
90
(defaults to True)
91
91
:param max_data_lines: maximum lines allowed in a data cell. If line count exceeds this, then the final
92
92
line displayed will be truncated with an ellipsis. (defaults to INFINITY)
93
- :raises: ValueError if width is less than 1
94
- :raises: ValueError if max_data_lines is less than 1
93
+ :raises ValueError: if width is less than 1
94
+ :raises ValueError: if max_data_lines is less than 1
95
95
"""
96
96
self .header = header
97
97
@@ -136,7 +136,7 @@ def __init__(self, cols: Sequence[Column], *, tab_width: int = 4) -> None:
136
136
:param cols: column definitions for this table
137
137
:param tab_width: all tabs will be replaced with this many spaces. If a row's fill_char is a tab,
138
138
then it will be converted to one space.
139
- :raises: ValueError if tab_width is less than 1
139
+ :raises ValueError: if tab_width is less than 1
140
140
"""
141
141
if tab_width < 1 :
142
142
raise ValueError ("Tab width cannot be less than 1" )
@@ -441,9 +441,9 @@ def generate_row(
441
441
:param post_line: string to print after each line of a row. This can be used for padding after
442
442
the last cell's text and a right row border. (Defaults to blank)
443
443
:return: row string
444
- :raises: ValueError if row_data isn't the same length as self.cols
445
- :raises: TypeError if fill_char is more than one character (not including ANSI style sequences)
446
- :raises: ValueError if fill_char, pre_line, inter_cell, or post_line contains an unprintable
444
+ :raises ValueError: if row_data isn't the same length as self.cols
445
+ :raises TypeError: if fill_char is more than one character (not including ANSI style sequences)
446
+ :raises ValueError: if fill_char, pre_line, inter_cell, or post_line contains an unprintable
447
447
character like a newline
448
448
"""
449
449
@@ -568,10 +568,10 @@ def __init__(
568
568
want a divider row. Defaults to dash. (Cannot be a line breaking character)
569
569
:param header_bg: optional background color for header cells (defaults to None)
570
570
:param data_bg: optional background color for data cells (defaults to None)
571
- :raises: ValueError if tab_width is less than 1
572
- :raises: ValueError if column_spacing is less than 0
573
- :raises: TypeError if divider_char is longer than one character
574
- :raises: ValueError if divider_char is an unprintable character
571
+ :raises ValueError: if tab_width is less than 1
572
+ :raises ValueError: if column_spacing is less than 0
573
+ :raises TypeError: if divider_char is longer than one character
574
+ :raises ValueError: if divider_char is an unprintable character
575
575
"""
576
576
super ().__init__ (cols , tab_width = tab_width )
577
577
@@ -624,8 +624,8 @@ def base_width(cls, num_cols: int, *, column_spacing: int = 2) -> int:
624
624
:param num_cols: how many columns the table will have
625
625
:param column_spacing: how many spaces to place between columns. Defaults to 2.
626
626
:return: base width
627
- :raises: ValueError if column_spacing is less than 0
628
- :raises: ValueError if num_cols is less than 1
627
+ :raises ValueError: if column_spacing is less than 0
628
+ :raises ValueError: if num_cols is less than 1
629
629
"""
630
630
if num_cols < 1 :
631
631
raise ValueError ("Column count cannot be less than 1" )
@@ -683,7 +683,7 @@ def generate_data_row(self, row_data: Sequence[Any]) -> str:
683
683
684
684
:param row_data: data with an entry for each column in the row
685
685
:return: data row string
686
- :raises: ValueError if row_data isn't the same length as self.cols
686
+ :raises ValueError: if row_data isn't the same length as self.cols
687
687
"""
688
688
if len (row_data ) != len (self .cols ):
689
689
raise ValueError ("Length of row_data must match length of cols" )
@@ -710,7 +710,7 @@ def generate_table(self, table_data: Sequence[Sequence[Any]], *, include_header:
710
710
:param include_header: If True, then a header will be included at top of table. (Defaults to True)
711
711
:param row_spacing: A number 0 or greater specifying how many blank lines to place between
712
712
each row (Defaults to 1)
713
- :raises: ValueError if row_spacing is less than 0
713
+ :raises ValueError: if row_spacing is less than 0
714
714
"""
715
715
if row_spacing < 0 :
716
716
raise ValueError ("Row spacing cannot be less than 0" )
@@ -769,8 +769,8 @@ def __init__(
769
769
:param border_bg: optional background color for borders (defaults to None)
770
770
:param header_bg: optional background color for header cells (defaults to None)
771
771
:param data_bg: optional background color for data cells (defaults to None)
772
- :raises: ValueError if tab_width is less than 1
773
- :raises: ValueError if padding is less than 0
772
+ :raises ValueError: if tab_width is less than 1
773
+ :raises ValueError: if padding is less than 0
774
774
"""
775
775
super ().__init__ (cols , tab_width = tab_width )
776
776
self .empty_data = [EMPTY ] * len (self .cols )
@@ -825,7 +825,7 @@ def base_width(cls, num_cols: int, *, column_borders: bool = True, padding: int
825
825
:param column_borders: if True, borders between columns will be included in the calculation (Defaults to True)
826
826
:param padding: number of spaces between text and left/right borders of cell
827
827
:return: base width
828
- :raises: ValueError if num_cols is less than 1
828
+ :raises ValueError: if num_cols is less than 1
829
829
"""
830
830
if num_cols < 1 :
831
831
raise ValueError ("Column count cannot be less than 1" )
@@ -974,7 +974,7 @@ def generate_data_row(self, row_data: Sequence[Any]) -> str:
974
974
975
975
:param row_data: data with an entry for each column in the row
976
976
:return: data row string
977
- :raises: ValueError if row_data isn't the same length as self.cols
977
+ :raises ValueError: if row_data isn't the same length as self.cols
978
978
"""
979
979
if len (row_data ) != len (self .cols ):
980
980
raise ValueError ("Length of row_data must match length of cols" )
@@ -1075,8 +1075,8 @@ def __init__(
1075
1075
:param header_bg: optional background color for header cells (defaults to None)
1076
1076
:param odd_bg: optional background color for odd numbered data rows (defaults to None)
1077
1077
:param even_bg: optional background color for even numbered data rows (defaults to StdBg.DARK_GRAY)
1078
- :raises: ValueError if tab_width is less than 1
1079
- :raises: ValueError if padding is less than 0
1078
+ :raises ValueError: if tab_width is less than 1
1079
+ :raises ValueError: if padding is less than 0
1080
1080
"""
1081
1081
super ().__init__ (
1082
1082
cols ,
0 commit comments