diff --git a/README.md b/README.md index 280f15f..d21fb58 100644 --- a/README.md +++ b/README.md @@ -165,14 +165,14 @@ All parameters are optional. | Option | Type | Default | Description | | :-----------------: | :-------------------: | :-------------------: | :-------------------------------------------------------------------------------: | -| `header` | `List[Any]` | `None` | First table row seperated by header row seperator. Values should support `str()`. | +| `header` | `List[Any]` | `None` | First table row seperated by header row separator. Values should support `str()`. | | `body` | `List[List[Any]]` | `None` | List of rows for the main section of the table. Values should support `str()`. | -| `footer` | `List[Any]` | `None` | Last table row seperated by header row seperator. Values should support `str()`. | +| `footer` | `List[Any]` | `None` | Last table row seperated by header row separator. Values should support `str()`. | | `column_widths` | `List[Optional[int]]` | `None` (automatic) | List of column widths in characters for each column | | `alignments` | `List[Alignment]` | `None` (all centered) | Column alignments
(ex. `[Alignment.LEFT, Alignment.CENTER, Alignment.RIGHT]`) | | `style` | `TableStyle` | `double_thin_compact` | Table style to use for the table\* | -| `first_col_heading` | `bool` | `False` | Whether to add a heading column seperator after the first column | -| `last_col_heading` | `bool` | `False` | Whether to add a heading column seperator before the last column | +| `first_col_heading` | `bool` | `False` | Whether to add a heading column separator after the first column | +| `last_col_heading` | `bool` | `False` | Whether to add a heading column separator before the last column | | `cell_padding` | `int` | `1` | The minimum number of spaces to add between the cell content and the cell border. | \*See a list of all preset styles [here](https://table2ascii.readthedocs.io/en/latest/styles.html). diff --git a/table2ascii/table_to_ascii.py b/table2ascii/table_to_ascii.py index f30cc97..a16dffc 100644 --- a/table2ascii/table_to_ascii.py +++ b/table2ascii/table_to_ascii.py @@ -150,7 +150,7 @@ def __row_to_ascii( self, left_edge: str, heading_col_sep: str, - column_seperator: str, + column_separator: str, right_edge: str, filler: str | list[SupportsStr], ) -> str: @@ -188,8 +188,8 @@ def __row_to_ascii( self.__alignments[col_index], ) output += col_content - # column seperator - sep = column_seperator + # column separator + sep = column_separator if col_index == 0 and self.__first_col_heading: # use column heading if first column option is specified sep = heading_col_sep @@ -197,7 +197,7 @@ def __row_to_ascii( # use column heading if last column option is specified sep = heading_col_sep elif col_index == self.__columns - 1: - # replace last seperator with symbol for edge of the row + # replace last separator with symbol for edge of the row sep = right_edge output += sep output += "\n" @@ -216,7 +216,7 @@ def __top_edge_to_ascii(self) -> str: return self.__row_to_ascii( left_edge=self.__style.top_left_corner, heading_col_sep=self.__style.heading_col_top_tee, - column_seperator=self.__style.top_tee, + column_separator=self.__style.top_tee, right_edge=self.__style.top_right_corner, filler=self.__style.top_and_bottom_edge, ) @@ -231,7 +231,7 @@ def __bottom_edge_to_ascii(self) -> str: return self.__row_to_ascii( left_edge=self.__style.bottom_left_corner, heading_col_sep=self.__style.heading_col_bottom_tee, - column_seperator=self.__style.bottom_tee, + column_separator=self.__style.bottom_tee, right_edge=self.__style.bottom_right_corner, filler=self.__style.top_and_bottom_edge, ) @@ -246,22 +246,22 @@ def __heading_row_to_ascii(self, row: list[SupportsStr]) -> str: return self.__row_to_ascii( left_edge=self.__style.left_and_right_edge, heading_col_sep=self.__style.heading_col_sep, - column_seperator=self.__style.col_sep, + column_separator=self.__style.col_sep, right_edge=self.__style.left_and_right_edge, filler=row, ) def __heading_sep_to_ascii(self) -> str: """ - Assembles the seperator below the header or above footer of the ascii table + Assembles the separator below the header or above footer of the ascii table Returns: - The seperator line + The separator line """ return self.__row_to_ascii( left_edge=self.__style.heading_row_left_tee, heading_col_sep=self.__style.heading_col_heading_row_cross, - column_seperator=self.__style.heading_row_cross, + column_separator=self.__style.heading_row_cross, right_edge=self.__style.heading_row_right_tee, filler=self.__style.heading_row_sep, ) @@ -276,7 +276,7 @@ def __body_to_ascii(self, body: list[list[SupportsStr]]) -> str: separation_row = self.__row_to_ascii( left_edge=self.__style.row_left_tee, heading_col_sep=self.__style.heading_col_row_cross, - column_seperator=self.__style.col_row_cross, + column_separator=self.__style.col_row_cross, right_edge=self.__style.row_right_tee, filler=self.__style.row_sep, ) @@ -284,7 +284,7 @@ def __body_to_ascii(self, body: list[list[SupportsStr]]) -> str: self.__row_to_ascii( left_edge=self.__style.left_and_right_edge, heading_col_sep=self.__style.heading_col_sep, - column_seperator=self.__style.col_sep, + column_separator=self.__style.col_sep, right_edge=self.__style.left_and_right_edge, filler=row, )