Skip to content

Commit c2ea215

Browse files
authored
refactor: Typo fix with separator used internally (#64)
1 parent 5f5e5cf commit c2ea215

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,14 +165,14 @@ All parameters are optional.
165165

166166
| Option | Type | Default | Description |
167167
| :-----------------: | :-------------------: | :-------------------: | :-------------------------------------------------------------------------------: |
168-
| `header` | `List[Any]` | `None` | First table row seperated by header row seperator. Values should support `str()`. |
168+
| `header` | `List[Any]` | `None` | First table row seperated by header row separator. Values should support `str()`. |
169169
| `body` | `List[List[Any]]` | `None` | List of rows for the main section of the table. Values should support `str()`. |
170-
| `footer` | `List[Any]` | `None` | Last table row seperated by header row seperator. Values should support `str()`. |
170+
| `footer` | `List[Any]` | `None` | Last table row seperated by header row separator. Values should support `str()`. |
171171
| `column_widths` | `List[Optional[int]]` | `None` (automatic) | List of column widths in characters for each column |
172172
| `alignments` | `List[Alignment]` | `None` (all centered) | Column alignments<br/>(ex. `[Alignment.LEFT, Alignment.CENTER, Alignment.RIGHT]`) |
173173
| `style` | `TableStyle` | `double_thin_compact` | Table style to use for the table\* |
174-
| `first_col_heading` | `bool` | `False` | Whether to add a heading column seperator after the first column |
175-
| `last_col_heading` | `bool` | `False` | Whether to add a heading column seperator before the last column |
174+
| `first_col_heading` | `bool` | `False` | Whether to add a heading column separator after the first column |
175+
| `last_col_heading` | `bool` | `False` | Whether to add a heading column separator before the last column |
176176
| `cell_padding` | `int` | `1` | The minimum number of spaces to add between the cell content and the cell border. |
177177

178178
\*See a list of all preset styles [here](https://table2ascii.readthedocs.io/en/latest/styles.html).

table2ascii/table_to_ascii.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def __row_to_ascii(
150150
self,
151151
left_edge: str,
152152
heading_col_sep: str,
153-
column_seperator: str,
153+
column_separator: str,
154154
right_edge: str,
155155
filler: str | list[SupportsStr],
156156
) -> str:
@@ -188,16 +188,16 @@ def __row_to_ascii(
188188
self.__alignments[col_index],
189189
)
190190
output += col_content
191-
# column seperator
192-
sep = column_seperator
191+
# column separator
192+
sep = column_separator
193193
if col_index == 0 and self.__first_col_heading:
194194
# use column heading if first column option is specified
195195
sep = heading_col_sep
196196
elif col_index == self.__columns - 2 and self.__last_col_heading:
197197
# use column heading if last column option is specified
198198
sep = heading_col_sep
199199
elif col_index == self.__columns - 1:
200-
# replace last seperator with symbol for edge of the row
200+
# replace last separator with symbol for edge of the row
201201
sep = right_edge
202202
output += sep
203203
output += "\n"
@@ -216,7 +216,7 @@ def __top_edge_to_ascii(self) -> str:
216216
return self.__row_to_ascii(
217217
left_edge=self.__style.top_left_corner,
218218
heading_col_sep=self.__style.heading_col_top_tee,
219-
column_seperator=self.__style.top_tee,
219+
column_separator=self.__style.top_tee,
220220
right_edge=self.__style.top_right_corner,
221221
filler=self.__style.top_and_bottom_edge,
222222
)
@@ -231,7 +231,7 @@ def __bottom_edge_to_ascii(self) -> str:
231231
return self.__row_to_ascii(
232232
left_edge=self.__style.bottom_left_corner,
233233
heading_col_sep=self.__style.heading_col_bottom_tee,
234-
column_seperator=self.__style.bottom_tee,
234+
column_separator=self.__style.bottom_tee,
235235
right_edge=self.__style.bottom_right_corner,
236236
filler=self.__style.top_and_bottom_edge,
237237
)
@@ -246,22 +246,22 @@ def __heading_row_to_ascii(self, row: list[SupportsStr]) -> str:
246246
return self.__row_to_ascii(
247247
left_edge=self.__style.left_and_right_edge,
248248
heading_col_sep=self.__style.heading_col_sep,
249-
column_seperator=self.__style.col_sep,
249+
column_separator=self.__style.col_sep,
250250
right_edge=self.__style.left_and_right_edge,
251251
filler=row,
252252
)
253253

254254
def __heading_sep_to_ascii(self) -> str:
255255
"""
256-
Assembles the seperator below the header or above footer of the ascii table
256+
Assembles the separator below the header or above footer of the ascii table
257257
258258
Returns:
259-
The seperator line
259+
The separator line
260260
"""
261261
return self.__row_to_ascii(
262262
left_edge=self.__style.heading_row_left_tee,
263263
heading_col_sep=self.__style.heading_col_heading_row_cross,
264-
column_seperator=self.__style.heading_row_cross,
264+
column_separator=self.__style.heading_row_cross,
265265
right_edge=self.__style.heading_row_right_tee,
266266
filler=self.__style.heading_row_sep,
267267
)
@@ -276,15 +276,15 @@ def __body_to_ascii(self, body: list[list[SupportsStr]]) -> str:
276276
separation_row = self.__row_to_ascii(
277277
left_edge=self.__style.row_left_tee,
278278
heading_col_sep=self.__style.heading_col_row_cross,
279-
column_seperator=self.__style.col_row_cross,
279+
column_separator=self.__style.col_row_cross,
280280
right_edge=self.__style.row_right_tee,
281281
filler=self.__style.row_sep,
282282
)
283283
return separation_row.join(
284284
self.__row_to_ascii(
285285
left_edge=self.__style.left_and_right_edge,
286286
heading_col_sep=self.__style.heading_col_sep,
287-
column_seperator=self.__style.col_sep,
287+
column_separator=self.__style.col_sep,
288288
right_edge=self.__style.left_and_right_edge,
289289
filler=row,
290290
)

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