1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-07-13 01:20:24 +02:00

fixy mypy issues

This commit is contained in:
Kelly Brazil
2022-02-01 16:49:31 -08:00
parent 0700dc7a64
commit a10d756629

View File

@ -60,10 +60,10 @@ def sparse_table_parse(data: List[str], delim: Optional[str] ='\u2063') -> List[
List of Dictionaries List of Dictionaries
""" """
output = [] output: List = []
header_text = data.pop(0) header_text: str = data.pop(0)
header_text = header_text + ' ' header_text = header_text + ' '
header_list = header_text.split() header_list: List = header_text.split()
# find each column index and end position # find each column index and end position
header_search = [header_list[0]] header_search = [header_list[0]]
@ -96,7 +96,7 @@ def sparse_table_parse(data: List[str], delim: Optional[str] ='\u2063') -> List[
h_end -= 1 h_end -= 1
# insert custom delimiter # insert custom delimiter
entry = entry[:h_end] + delim + entry[h_end + 1:] entry = f'{entry[:h_end]}{delim}{entry[h_end + 1:]}'
# create the entry list from the new custom delimiter # create the entry list from the new custom delimiter
entry_list = entry.split(delim, maxsplit=len(header_list) - 1) entry_list = entry.split(delim, maxsplit=len(header_list) - 1)