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