1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-06-25 00:37:31 +02:00

formatting

This commit is contained in:
Kelly Brazil
2022-03-24 09:39:53 -07:00
parent 6748c3cc91
commit 619de68a61
2 changed files with 8 additions and 9 deletions

View File

@ -155,7 +155,7 @@ def _strip(string: str) -> str:
def _table_sniff(string: str) -> str:
"""Find the table-type via heuristics"""
"""find the table-type via heuristics"""
# pretty tables
for line in string.splitlines():
line = line.strip()
@ -186,7 +186,7 @@ def _table_sniff(string: str) -> str:
def _is_separator(line: str) -> bool:
"""Returns true if a table separator line is found"""
"""returns true if a table separator line is found"""
strip_line = line.strip()
if any((
strip_line.startswith('') and strip_line.endswith(''),
@ -234,7 +234,7 @@ def _snake_case(line: str) -> str:
def _fixup_separators(line: str) -> str:
"""Normalize separators, and remove first and last separators"""
"""normalize separators, and remove first and last separators"""
# normalize separator
line = line.replace('', '|')\
.replace('', '|')\
@ -258,9 +258,7 @@ def _fixup_separators(line: str) -> str:
def _normalize_rows(table_lines: Iterable[str]) -> List[Tuple[int, List[str]]]:
"""
Return a List of tuples of row-counters and data lines.
"""
"""return a List of tuples of row-counters and data lines."""
result = []
header_found = False
data_found = False